Skip to content
Snippets Groups Projects
  1. Apr 29, 2023
    • Deucе's avatar
      Default to building with GDI · 42f906f9
      Deucе authored
      Add setwinsize and setwinpos
      Move blit from rect into gdi_thread
      Add beep support
      Add (non-functional) settitle support
      Support ciolib scaling in addition to GDI scaling
      Add window-size snapping
      Support -iG in SyncTERM
      
      GDI is still the second-least preferred mode, so auto mode will only
      use it if the windows console somehow fails.  But at least people
      can play with it.
      42f906f9
  2. Apr 26, 2023
  3. Apr 25, 2023
  4. Apr 24, 2023
    • Deucе's avatar
      Remove blinker_lock · 801b662f
      Deucе authored
      This lock has devolved into a wrapper lock for vstatlock.
      801b662f
    • Deucе's avatar
      Some minor synchronization fiddling · 7309e270
      Deucе authored
      Use pthread_once() for init_mouse() instead of a global
      Fix some lock issues in cb_drawrect()
      7309e270
    • Deucе's avatar
      Use a single memmove() when moving the entire width. · f4abff4f
      Deucе authored
      When fast scrolling, memmove() takes most of the CPU by far... it
      is likely actually worth having each line be a buffer of its own
      and just moving the pointers around.  To help with this optimization
      in the future, move the screen memmove() bit into a separate function.
      f4abff4f
  5. Apr 23, 2023
  6. Apr 22, 2023
  7. Apr 21, 2023
    • Deucе's avatar
      Get vstat out of sdl_add_key() path · 22c8b09f
      Deucе authored
      This should almost completely remove vstatlock contention in SyncTERM,
      which should bring SDL output performance close to X11 performance.
      22c8b09f
    • Deucе's avatar
      Push cvstat into sdl_video_event_thread() stack · fdce00a4
      Deucе authored
      This makes cvstat work as intended, so we no longer need to lock
      vstatlock when accessing it since it's only accessed from the
      video event thread.
      
      There's still an irritating dependency on vstat for ALT-Enter handling.
      fdce00a4
  8. Apr 20, 2023
    • Deucе's avatar
      Add TODO comment for cvstat. · f06029a3
      Deucе authored
      When originally created, it was intended to be accessed only by a
      single thread, and therefore not need mutex protection, allowing
      less code to run with vstatlock held.  Unfortunately, this is not
      how it turned out, so cvstat should either be removed, or it should
      actually be cleaned up to work as intended.
      f06029a3
    • Deucе's avatar
      Use a local vstat copy instead of cvstat to avoid holding the lock · 6369925c
      Deucе authored
      for an extended time.  Should fix SDL mode slowness.
      
      Only call RenderPresent() if we called RenderCopy().  Should fix
      SDL mode flickering.
      6369925c
  9. Feb 11, 2023
    • Deucе's avatar
      Fix a couple issues found by Coverity · f47c6079
      Deucе authored
      1) Unreachable return without a lock in sdl_useR_func_ret() (harmless)
      2) LOR in handling SDL_USEREVENT
         - vstatlock was obtained inside of win_mutex which should never
           be done... this could (and likely does) result in a deadlock
           when using SDL mode.
      f47c6079
  10. Dec 26, 2022
    • Deucе's avatar
      Now that SDL_USEREVENT_SETVIDMODE takes a size, we can clean up · 2fa70069
      Deucе authored
      sdl_setwinsize() and eliminate another race.
      2fa70069
    • Deucе's avatar
      More SDL cleanup · 1e557ffa
      Deucе authored
      1e557ffa
    • Deucе's avatar
      Various SDL fixes: · a194a157
      Deucе authored
      Pass window size in SDL_USEREVENT_SETVIDMODE
      - Fixes race condition where SDL_WINDOWEVENT_RESIZED or
        SDL_WINDOWEVENT_SIZE_CHANGED arraves while
        SDL_USEREVENT_SETVIDMODE is in the queue
      
      Set new scaling based on old scaling multiplier
      - Will resize window on mode changes, but tries to keep integer
        multiplier similar.  May break fullscreen modes, dunno.
      
      Have aspect_fix() return higher rather than lower
      - This may make it the same as aspect_correct(), but I'm too lazy
        to figure that out.
      a194a157
    • Deucе's avatar
      Fix aspect_fix() to always grow, not shrink. · 27c4296c
      Deucе authored
      Add additional stderr debugging.
      Don't try to correct the aspect ratio of the window.
      27c4296c
  11. May 20, 2021
  12. May 19, 2021
    • Deucе's avatar
      Go back to ALT-Up/Down for speed adjustment · 6285417f
      Deucе authored
      Now that ALT-Up/Down no longer have an effect on window size, they
      can go back to their previous bindings of changing the emulated
      output speed.
      
      At the same time, remove AltGr support from keysym parsing since it
      should be properly handled by the text input stuff now.
      6285417f
    • Deucе's avatar
      Use display aspect ratio, not pixel for tracking. · a5c619fc
      Deucе authored
      People are used to thinking about the aspect ratio of displays and
      used to not thinking at all about that of pixels.  Most of the modes
      are simplt 4:3 modes and the text area is the entire window.  The
      only oddball here is the Commodore 64 and 128 40-column modes.
      Because they have a border around them that's wider on the sides than
      the top/bottom, the display aspect ratio is actually narrower than
      a normal NTSC screen (6:5).  It seems the PAL version actually has
      square pixels, but nobody has asked for a PAL Commodore mode, and I
      think that has a different colour palette too so I'm not doing it.
      
      Just to frustrate DigitalMan a bit, the default custom aspect ratio
      is now 4:3 (but can be configured).  At present, modifying the custom
      mode while *in* the custom modes "works", which no sane person would
      want when adjusting the aspect ratio.
      a5c619fc
  13. May 17, 2021
  14. May 15, 2021
  15. May 14, 2021
  16. May 13, 2021
    • Deucе's avatar
      More fallout from non-square pixels... · 26def071
      Deucе authored
      This fixes all the window adjustment "stuff", but the new aspect
      ratio enforcement means that ALT-UP and ALT-DOWN are useless for
      resizing the window unless it's not already snapped... use ALT-LEFT
      and ALT-RIGHT to decrease/increase the window size.
      26def071
    • Deucе's avatar
      Keep correct aspect ratio when resizing window. · 5f027c49
      Deucе authored
      Also, the 8x16 font at 80x25 is *not* a square pixel aspect ratio.
      As a result, it now stays "proper", which is likely not what you
      want.
      
      This was discovered when I was trying to make DigitalMan happy
      because he wanted the apsect ratio retained on scaling.
      
      Sorry for the impending imminent scaling hassle DigitalMan!
      5f027c49
  17. Mar 19, 2021
    • Deucе's avatar
      Fix AltGr with SDL2 · 1495774a
      Deucе authored
      This is pretty insane since SDL2 completely ignores the keysym value
      of the X11 keyboard event, so here's what we do...
      
      1) When there's a keypress that includes right-alt, store the sym/mod
      2) When we get text input, if it's the same as we would get if ALT
         wasn't pressed for the last keydown, parse through the mapping
         (ie: handle ALT keys)
      3) If it's different, use that (gets AltGr modified value)
      
      I get that AltGr is hard in a cross-platform way, but just pretending
      it doesn't exist at all for key input is a very weird choice.
      1495774a
  18. Mar 17, 2021
  19. Mar 16, 2021
  20. Mar 14, 2021
  21. Jun 27, 2020
  22. May 22, 2020
  23. May 15, 2020
  24. May 14, 2020
Loading