Skip to content
Snippets Groups Projects
  1. Jun 07, 2023
    • Deucе's avatar
      Work around marco or SDL bug in SDL_SetWindowMinimumSize() · 64f21b53
      Deucе authored
      When using the marco WM, and resizing using ALT-Right-drag, calls to
      SDL_SetWindowMinimumSize() result in the top-left corner of the
      window moving up and to the left (appears to be by the border size).
      
      To prevent this from being a maddening issue under marco, ensure
      we only call SDL_SetWindowMinimumSize() once when the minimum size
      changes on the window.
      
      Fixes SF ticket 115, thanks Ragnarok!
      
      While we're hear, ensure the minimium maximum window size holds
      the original sized window... we're not interested in downscaling.
      64f21b53
  2. Jun 04, 2023
  3. Jun 03, 2023
  4. Jun 01, 2023
  5. May 15, 2023
  6. May 13, 2023
  7. May 12, 2023
    • Deucе's avatar
      Use a double for scaling instead of an integer · 26c95448
      Deucе authored
      All bitmap drivers now support arbitrary scaling, and the scaling
      factor is a double, allowing arbitrary window scaling in all bitmap
      modes (making nelgin happy).
      
      While we're here, fix bugs in horizontal interpolation and X window
      resizeing.
      26c95448
  8. May 07, 2023
    • Deucе's avatar
      Add a new ciolib_initial_mode global variable · 8b1031d8
      Deucе authored
      For graphical modes, this requests that ciolib be initialized in
      the specified mode.  For text-based modes (ANSI, Curses, Win32 Console),
      this is not used and "current" is used instead.
      8b1031d8
  9. May 06, 2023
  10. May 04, 2023
  11. May 03, 2023
    • Deucе's avatar
      Implement set/get scaling for SDL and GDI. · a62e92dd
      Deucе authored
      This is now simple to implement.
      
      Also, add ciolib_initial_scaling so the initial window can be created
      with the appropriate scaling already applied.
      
      We still need a way to specifiy the initial text mode, but these
      globals are not the right way.
      a62e92dd
  12. May 02, 2023
  13. Apr 29, 2023
    • Deucе's avatar
      Don't treat numpad /*-+ differently based on NumLock in SDL · 47977472
      Deucе authored
      This caused double-keys on those when numlock was off.  Only the
      number keys and period need special NumLock handling.
      
      Fixes bug 108 on SourceForge, thanks nelgin!
      47977472
    • 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
  14. Apr 26, 2023
  15. Apr 25, 2023
  16. 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
  17. Apr 23, 2023
  18. Apr 22, 2023
  19. 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
  20. 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
  21. 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
  22. 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
  23. May 20, 2021
  24. 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
  25. May 17, 2021
  26. May 15, 2021
Loading