• src/conio/sdl_con.c

    From Deucе@VERT to Git commit to main/sbbs/master on Sun Mar 14 03:07:48 2021
    https://gitlab.synchro.net/main/sbbs/-/commit/0634130f732643afcefe1b34
    Modified Files:
    src/conio/sdl_con.c
    Log Message:
    Fix SF #44 problem keypad non-numbers

    Make an exception for all keypad stuff.

    ---
    ï¿­ Synchronet ï¿­ Vertrauen ï¿­ Home of Synchronet ï¿­ [vert/cvs/bbs].synchro.net
  • From Deucе@VERT to Git commit to main/sbbs/master on Wed Mar 17 13:38:49 2021
    https://gitlab.synchro.net/main/sbbs/-/commit/248eb2b590cfc5dee387ad2c
    Modified Files:
    src/conio/sdl_con.c
    Log Message:
    Special-case TAB so "backtab" works properly.

    ---
    ï¿­ Synchronet ï¿­ Vertrauen ï¿­ Home of Synchronet ï¿­ [vert/cvs/bbs].synchro.net
  • From Deucе@VERT to Git commit to main/sbbs/master on Fri Mar 19 11:05:12 2021
    https://gitlab.synchro.net/main/sbbs/-/commit/1495774a066cb027a3d96cf7
    Modified Files:
    src/conio/sdl_con.c
    Log Message:
    Fix AltGr with SDL2

    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.

    ---
    ï¿­ Synchronet ï¿­ Vertrauen ï¿­ Home of Synchronet ï¿­ [vert/cvs/bbs].synchro.net
  • From Deucе@VERT to Git commit to main/sbbs/master on Thu May 13 00:45:37 2021
    https://gitlab.synchro.net/main/sbbs/-/commit/5f027c495b76aabf182c4905
    Modified Files:
    src/conio/sdl_con.c
    Log Message:
    Keep correct aspect ratio when resizing window.

    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!

    ---
    ï¿­ Synchronet ï¿­ Vertrauen ï¿­ Home of Synchronet ï¿­ [vert/cvs/bbs].synchro.net
  • From Deucе@VERT to Git commit to main/sbbs/master on Thu May 13 01:32:47 2021
    https://gitlab.synchro.net/main/sbbs/-/commit/26def07178f2affe11442bf5
    Modified Files:
    src/conio/sdl_con.c
    Log Message:
    More fallout from non-square pixels...

    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.

    ---
    ï¿­ Synchronet ï¿­ Vertrauen ï¿­ Home of Synchronet ï¿­ [vert/cvs/bbs].synchro.net
  • From Deucе@VERT to Git commit to main/sbbs/master on Fri May 14 16:13:00 2021
    https://gitlab.synchro.net/main/sbbs/-/commit/9aca9bf4b603144ffb46a09f
    Modified Files:
    src/conio/sdl_con.c
    Log Message:
    sdl_con.c can have stdbool.h too.

    ---
    ï¿­ Synchronet ï¿­ Vertrauen ï¿­ Home of Synchronet ï¿­ [vert/cvs/bbs].synchro.net
  • From Deucе@VERT to Git commit to main/sbbs/master on Fri May 14 17:01:09 2021
    https://gitlab.synchro.net/main/sbbs/-/commit/49756aa756b0570337da16e7
    Modified Files:
    src/conio/sdl_con.c
    Log Message:
    Use lround(), not roundl().

    Also, include math.h

    ---
    ï¿­ Synchronet ï¿­ Vertrauen ï¿­ Home of Synchronet ï¿­ [vert/cvs/bbs].synchro.net
  • From Deucе@VERT to Git commit to main/sbbs/master on Mon May 17 09:39:10 2021
    https://gitlab.synchro.net/main/sbbs/-/commit/e7100fcbd1aae6959c38ee40
    Modified Files:
    src/conio/sdl_con.c
    Log Message:
    Specify HighDPI mode when creating a window.

    This may solve issue where using Windows "DPI scaling" forces the
    window to be scaled.

    ---
    ï¿­ Synchronet ï¿­ Vertrauen ï¿­ Home of Synchronet ï¿­ [vert/cvs/bbs].synchro.net
  • From Deucе@VERT to Git commit to main/sbbs/master on Mon May 17 10:01:07 2021
    https://gitlab.synchro.net/main/sbbs/-/commit/fccd7c1dd05309a672690d0d
    Modified Files:
    src/conio/sdl_con.c
    Log Message:
    Use the API to insist SyncTERM is "High DPI aware"

    Microsoft wants us to use a manifest for this, but I really don't
    feel like digging into however one uses manifest files when not
    using the Microsoft build files.

    Details here: https://docs.microsoft.com/en-us/windows/win32/hidpi/setting-the-default-dpi-awareness-for-a-process

    ---
    ï¿­ Synchronet ï¿­ Vertrauen ï¿­ Home of Synchronet ï¿­ [vert/cvs/bbs].synchro.net
  • From Deucе@VERT to Git commit to main/sbbs/master on Sun Dec 25 21:45:27 2022
    https://gitlab.synchro.net/main/sbbs/-/commit/a194a15736de98517f48a9b3
    Modified Files:
    src/conio/sdl_con.c
    Log Message:
    Various SDL fixes:

    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.

    ---
    ï¿­ Synchronet ï¿­ Vertrauen ï¿­ Home of Synchronet ï¿­ [vert/cvs/bbs].synchro.net
  • From Deucе@VERT to Git commit to main/sbbs/master on Mon Dec 26 00:38:10 2022
    https://gitlab.synchro.net/main/sbbs/-/commit/2fa700696c34fb298fd24c7b
    Modified Files:
    src/conio/sdl_con.c
    Log Message:
    Now that SDL_USEREVENT_SETVIDMODE takes a size, we can clean up sdl_setwinsize() and eliminate another race.

    ---
    ï¿­ Synchronet ï¿­ Vertrauen ï¿­ Home of Synchronet ï¿­ [vert/cvs/bbs].synchro.net
  • From Deucе@VERT to Git commit to main/sbbs/master on Fri Feb 10 19:12:31 2023
    https://gitlab.synchro.net/main/sbbs/-/commit/f47c60792c13c8bd9c4e67c4
    Modified Files:
    src/conio/sdl_con.c
    Log Message:
    Fix a couple issues found by Coverity

    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.

    ---
    ï¿­ Synchronet ï¿­ Vertrauen ï¿­ Home of Synchronet ï¿­ [vert/cvs/bbs].synchro.net
  • From Deucе@VERT to Git commit to main/sbbs/master on Thu Apr 20 15:12:48 2023
    https://gitlab.synchro.net/main/sbbs/-/commit/6369925c868a8a9485e6627f
    Modified Files:
    src/conio/sdl_con.c
    Log Message:
    Use a local vstat copy instead of cvstat to avoid holding the lock
    for an extended time. Should fix SDL mode slowness.

    Only call RenderPresent() if we called RenderCopy(). Should fix
    SDL mode flickering.

    ---
    ï¿­ Synchronet ï¿­ Vertrauen ï¿­ Home of Synchronet ï¿­ [vert/cvs/bbs].synchro.net
  • From Deucе@VERT to Git commit to main/sbbs/master on Thu Apr 20 16:00:27 2023
    https://gitlab.synchro.net/main/sbbs/-/commit/f06029a3889734491909ebe9
    Modified Files:
    src/conio/sdl_con.c
    Log Message:
    Add TODO comment for cvstat.

    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.

    ---
    ï¿­ Synchronet ï¿­ Vertrauen ï¿­ Home of Synchronet ï¿­ [vert/cvs/bbs].synchro.net
  • From Deucе@VERT to Git commit to main/sbbs/master on Fri Apr 21 10:26:55 2023
    https://gitlab.synchro.net/main/sbbs/-/commit/fdce00a456a33dc858067aef
    Modified Files:
    src/conio/sdl_con.c
    Log Message:
    Push cvstat into sdl_video_event_thread() stack

    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.

    ---
    ï¿­ Synchronet ï¿­ Vertrauen ï¿­ Home of Synchronet ï¿­ [vert/cvs/bbs].synchro.net
  • From Deucе@VERT to Git commit to main/sbbs/master on Fri Apr 21 10:26:55 2023
    https://gitlab.synchro.net/main/sbbs/-/commit/22c8b09f824496b7c68e599e
    Modified Files:
    src/conio/sdl_con.c
    Log Message:
    Get vstat out of sdl_add_key() path

    This should almost completely remove vstatlock contention in SyncTERM,
    which should bring SDL output performance close to X11 performance.

    ---
    ï¿­ Synchronet ï¿­ Vertrauen ï¿­ Home of Synchronet ï¿­ [vert/cvs/bbs].synchro.net
  • From Deucе@VERT to Git commit to main/sbbs/master on Tue Apr 25 09:41:15 2023
    https://gitlab.synchro.net/main/sbbs/-/commit/832871707fc3f2d37ff1891d
    Modified Files:
    src/conio/sdl_con.c
    Log Message:
    On a window resize event, only set the window size if it's different

    Fixes issue on Linux where the window size is constantly updated,
    and window rabidly steals focus.

    ---
    ï¿­ Synchronet ï¿­ Vertrauen ï¿­ Home of Synchronet ï¿­ [vert/cvs/bbs].synchro.net
  • From Deucе@VERT to Git commit to main/sbbs/master on Wed Apr 26 10:39:20 2023
    https://gitlab.synchro.net/main/sbbs/-/commit/defc638c9f1cc95ca234a780
    Modified Files:
    src/conio/sdl_con.c
    Log Message:
    Check SDL window size when checking if size changed.

    ---
    ï¿­ Synchronet ï¿­ Vertrauen ï¿­ Home of Synchronet ï¿­ [vert/cvs/bbs].synchro.net
  • From Deucе@VERT to Git commit to main/sbbs/master on Sat Apr 29 10:42:01 2023
    https://gitlab.synchro.net/main/sbbs/-/commit/47977472de4bfce66f1bd4d1
    Modified Files:
    src/conio/sdl_con.c
    Log Message:
    Don't treat numpad /*-+ differently based on NumLock in SDL

    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!

    ---
    ï¿­ Synchronet ï¿­ Vertrauen ï¿­ Home of Synchronet ï¿­ [vert/cvs/bbs].synchro.net
  • From Deucе@VERT to Git commit to main/sbbs/master on Thu May 4 07:21:50 2023
    https://gitlab.synchro.net/main/sbbs/-/commit/9137e82c9afa91f0c0647c70
    Modified Files:
    src/conio/sdl_con.c
    Log Message:
    Fix warnings reported by Digitalman

    ---
    ï¿­ Synchronet ï¿­ Vertrauen ï¿­ Home of Synchronet ï¿­ [vert/cvs/bbs].synchro.net
  • From Rob Swindell (on Debian Linux)@VERT to Git commit to main/sbbs/master on Fri May 5 21:29:01 2023
    https://gitlab.synchro.net/main/sbbs/-/commit/875c77ea0bc774be2c2a4f67
    Modified Files:
    src/conio/sdl_con.c
    Log Message:
    Resolve GCC warnings: cast from pointer to integer of different size

    Pretty sure this is what intptr_t was created for.

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Deucе@VERT to Git commit to main/sbbs/master on Sun May 14 20:26:56 2023
    https://gitlab.synchro.net/main/sbbs/-/commit/4af4effb3148c0c695e56ad1
    Modified Files:
    src/conio/sdl_con.c
    Log Message:
    Fix deadlock in SDL mode.

    sdl_getscaling() does not require vstatlock. Move it out.

    ---
    ï¿­ Synchronet ï¿­ Vertrauen ï¿­ Home of Synchronet ï¿­ [vert/cvs/bbs].synchro.net
  • From Deucе@VERT to Git commit to main/sbbs/master on Thu Jun 1 13:58:12 2023
    https://gitlab.synchro.net/main/sbbs/-/commit/978d4d0b7b64a39a30092e57
    Modified Files:
    src/conio/sdl_con.c
    Log Message:
    Use cast instead of pointer math to fix Win32 build

    ---
    ï¿­ Synchronet ï¿­ Vertrauen ï¿­ Home of Synchronet ï¿­ [vert/cvs/bbs].synchro.net
  • From Deucе@VERT to Git commit to main/sbbs/master on Sat Jun 3 18:14:04 2023
    https://gitlab.synchro.net/main/sbbs/-/commit/268893cc9b77f7e96343bb11
    Modified Files:
    src/conio/sdl_con.c
    Log Message:
    When switching from fullscreen mode, recalculate win size.

    ---
    ï¿­ Synchronet ï¿­ Vertrauen ï¿­ Home of Synchronet ï¿­ [vert/cvs/bbs].synchro.net
  • From Deucе@VERT to Git commit to main/sbbs/master on Mon Sep 23 02:25:05 2024
    https://gitlab.synchro.net/main/sbbs/-/commit/02dce6574620f4ce357e8f3f
    Modified Files:
    src/conio/sdl_con.c
    Log Message:
    Update fullscreen and mode on Darwin to match window

    This should normalize everything, with the possible exception of
    "zoom" (the thing other OSs call maximized). Ideally, we wouldn't
    allow window size changes when "zoomed" if we could detect the state,
    but it doesn't look like we can.

    ---
    ï¿­ Synchronet ï¿­ Vertrauen ï¿­ Home of Synchronet ï¿­ [vert/cvs/bbs].synchro.net
  • From Deucе@VERT to Git commit to main/sbbs/master on Mon Sep 23 09:08:42 2024
    https://gitlab.synchro.net/main/sbbs/-/commit/5d04a76d7d03ec4a64934d05
    Modified Files:
    src/conio/sdl_con.c
    Log Message:
    Fix build.

    Whoops.

    ---
    ï¿­ Synchronet ï¿­ Vertrauen ï¿­ Home of Synchronet ï¿­ [vert/cvs/bbs].synchro.net
  • From Deucе@VERT to Git commit to main/sbbs/master on Thu Oct 10 20:34:24 2024
    https://gitlab.synchro.net/main/sbbs/-/commit/f8044342788577da85ca26a1
    Modified Files:
    src/conio/sdl_con.c
    Log Message:
    Store window size on size change event.

    Allows arbitrary sized windows on Darwin... the OS is still scaling
    the window contents though rather than allowing us to dynamically
    update them.

    ---
    ï¿­ Synchronet ï¿­ Vertrauen ï¿­ Home of Synchronet ï¿­ [vert/cvs/bbs].synchro.net
  • From Deucе@VERT to Git commit to main/sbbs/master on Fri Oct 18 19:18:55 2024
    https://gitlab.synchro.net/main/sbbs/-/commit/a5438fc8bc465938a29d0af3
    Modified Files:
    src/conio/sdl_con.c
    Log Message:
    Basically a revert of 02dce657

    This appears to break the mouse position stuff. :(

    ---
    ï¿­ Synchronet ï¿­ Vertrauen ï¿­ Home of Synchronet ï¿­ [vert/cvs/bbs].synchro.net
  • From Deucе@VERT to Git commit to main/sbbs/master on Sat Oct 19 08:10:30 2024
    https://gitlab.synchro.net/main/sbbs/-/commit/b493e7b3ea4d4d9e2d351403
    Modified Files:
    src/conio/sdl_con.c
    Log Message:
    Query current fullscreen state on ALT-Enter

    Because things get weird sometimes.

    ---
    ï¿­ Synchronet ï¿­ Vertrauen ï¿­ Home of Synchronet ï¿­ [vert/cvs/bbs].synchro.net
  • From Deucе@VERT to Git commit to main/sbbs/master on Sat Oct 19 08:10:30 2024
    https://gitlab.synchro.net/main/sbbs/-/commit/ae97eae2e8b3fc61d1fbddb1
    Modified Files:
    src/conio/sdl_con.c
    Log Message:
    Spell SDL_WINDOW_FULLSCREEN correctly.

    Also, there's SDL_WINDOW_FULLSCREEN_DESKTOP, so or that in even
    though we don't need to due to how it's defined.

    ---
    ï¿­ Synchronet ï¿­ Vertrauen ï¿­ Home of Synchronet ï¿­ [vert/cvs/bbs].synchro.net
  • From Deucе@VERT to Git commit to main/sbbs/master on Sat Oct 19 11:17:33 2024
    https://gitlab.synchro.net/main/sbbs/-/commit/f6f20a635e8a693c511fe43d
    Modified Files:
    src/conio/sdl_con.c
    Log Message:
    Add call to update_cvstat() in setup_surfaces()

    This should ensure that cvstat has the right window size at the start.
    I hope.

    ---
    ï¿­ Synchronet ï¿­ Vertrauen ï¿­ Home of Synchronet ï¿­ [vert/cvs/bbs].synchro.net
  • From Deucе@VERT to Git commit to main/sbbs/master on Sun Nov 3 11:14:25 2024
    https://gitlab.synchro.net/main/sbbs/-/commit/099cfb35ff70d4074329280d
    Modified Files:
    src/conio/sdl_con.c
    Log Message:
    Fix LOR

    ---
    ï¿­ Synchronet ï¿­ Vertrauen ï¿­ Home of Synchronet ï¿­ [vert/cvs/bbs].synchro.net
  • From Deucе@VERT to Git commit to main/sbbs/master on Sun Nov 3 11:14:25 2024
    https://gitlab.synchro.net/main/sbbs/-/commit/20165689e200d526fb30269b
    Modified Files:
    src/conio/sdl_con.c
    Log Message:
    Add locking around win access

    ---
    ï¿­ Synchronet ï¿­ Vertrauen ï¿­ Home of Synchronet ï¿­ [vert/cvs/bbs].synchro.net