• src/conio/sdl_con.c

    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 Sat Feb 17 10:36:15 2024
    https://gitlab.synchro.net/main/sbbs/-/commit/7c44187868e59355f598180a
    Modified Files:
    src/conio/sdl_con.c
    Log Message:
    For SDL mode, ensure rect matches vstat as well.

    ---
    ï¿­ Synchronet ï¿­ Vertrauen ï¿­ Home of Synchronet ï¿­ [vert/cvs/bbs].synchro.net
  • From Deucе@VERT to Git commit to main/sbbs/master on Sun Mar 17 12:29:59 2024
    https://gitlab.synchro.net/main/sbbs/-/commit/960cee2703cd4650f2805d4f
    Modified Files:
    src/conio/sdl_con.c
    Log Message:
    Do not attempt to clean up SDL unless it was initialized.

    Should fix js test suite on darwin.

    ---
    ï¿­ Synchronet ï¿­ Vertrauen ï¿­ Home of Synchronet ï¿­ [vert/cvs/bbs].synchro.net
  • From Deucе@VERT to Git commit to main/sbbs/master on Sun Mar 17 14:30:07 2024
    https://gitlab.synchro.net/main/sbbs/-/commit/d281862b290f8ee309892e63
    Modified Files:
    src/conio/sdl_con.c
    Log Message:
    Call exit() from exit_sdl_con if ciolib_reaper is enabled and SDL is not initialized.

    ---
    ï¿­ Synchronet ï¿­ Vertrauen ï¿­ Home of Synchronet ï¿­ [vert/cvs/bbs].synchro.net
  • From Deucе@VERT to Git commit to main/sbbs/master on Sun Mar 17 14:31:06 2024
    https://gitlab.synchro.net/main/sbbs/-/commit/ea900928153cef278cf404bc
    Modified Files:
    src/conio/sdl_con.c
    Log Message:
    Revert last change reaper is explicitly disabled here.

    ---
    ï¿­ Synchronet ï¿­ Vertrauen ï¿­ Home of Synchronet ï¿­ [vert/cvs/bbs].synchro.net
  • From deuce@VERT to CVS commit on Wed Apr 15 15:29:33 2020
    src/conio sdl_con.c 1.281 1.282
    Update of /cvsroot/sbbs/src/conio
    In directory cvs:/tmp/cvs-serv16882

    Modified Files:
    sdl_con.c
    Log Message:
    Update input translation for SDL2...
    Hopefully this fixes the issue Ragnorok was reporting with a Spanish
    keyboard.



    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From deuce@VERT to CVS commit on Wed Apr 15 17:02:24 2020
    src/conio sdl_con.c 1.283 1.284
    Update of /cvsroot/sbbs/src/conio
    In directory cvs:/tmp/cvs-serv7299

    Modified Files:
    sdl_con.c
    Log Message:
    Overhaul input yet again... this *should* fix Ragnorok's problem... but
    *may* break all sorts of other things.




    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Ragnarok@VERT/DOCKSUD to deuce on Wed Apr 15 22:57:09 2020
    El 15/4/20 a las 21:02, deuce escribió:
    src/conio sdl_con.c 1.283 1.284
    Update of /cvsroot/sbbs/src/conio
    In directory cvs:/tmp/cvs-serv7299

    Modified Files:
    sdl_con.c
    Log Message:
    Overhaul input yet again... this *should* fix Ragnorok's problem... but
    *may* break all sorts of other things.

    realy break!
    i move o up/down/let/right and segfault

    Starting program: /home/ragnarok/src/ftoledo/sbbs/cvs/src/syncterm/gcc.linux.x64.exe.debug/syncterm

    [Thread debugging using libthread_db enabled]
    Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
    [New Thread 0x7ffff6479700 (LWP 3417)]
    [Thread 0x7ffff6479700 (LWP 3417) exited]
    [New Thread 0x7fffe8015700 (LWP 3418)]
    [New Thread 0x7fffe7814700 (LWP 3419)]
    [New Thread 0x7fffe7013700 (LWP 3420)]
    [New Thread 0x7fffe6812700 (LWP 3421)]

    Thread 4 "Main Thread" received signal SIGSEGV, Segmentation fault.
    [Switching to Thread 0x7fffe7814700 (LWP 3419)]
    0x00005555556f3811 in sdl_video_event_thread (data=0x0) at sdl_con.c:836
    836 if (block_text || !isprint(ev.key.keysym.sym))
    (gdb) bt
    #0 0x00005555556f3811 in sdl_video_event_thread (data=0x0) at sdl_con.c:836
    #1 0x00007ffff705e4a4 in start_thread (arg=0x7fffe7814700) at pthread_create.c:456
    #2 0x00007ffff6da0d0f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:97

    also (previous this last commits) i fond that hang when try to play bell
    sound i think:

    (gdb) bt
    #0 __lll_lock_wait () at
    ../sysdeps/unix/sysv/linux/x86_64/lowlevellock.S:135
    #1 0x00007ffff7060bb5 in __GI___pthread_mutex_lock
    (mutex=0x555555c230c0 <sample_mutex>) at ../nptl/pthread_mutex_lock.c:80
    #2 0x000055555570f805 in xp_play_sample (
    sample=0x555555bf1440 <wave> "~\177\177\200\200\201\201\200\200\177}zywvuuuuvvuuutrqqppoooppponljhfdcbbcfhlpx|z\202\210\211\210\203zria[VSSSSUUUSQMIE@><;;<>>>;81*!\031\020\n\a\a\f\023\037+;^ly\202\210\212\207\203|skb\\VTRSSUUTTQNIEB><<;<>>=<81*\"\031\021\v\b\a\v\022\034+8[kw\202\210\212\210\204}tkc]WSRRSUUUTRNJFA><;;<=>?<92+$\033\022\f\b\006\n\020\034("...,
    size=2205, background=1) at xpbeep.c:924
    #3 0x00005555556f4237 in sdl_beep () at sdl_con.c:1052
    #4 0x00005555556d7403 in ciolib_beep () at ciolib.c:1716
    #5 0x00005555556d6af9 in ciolib_putch (ch=7) at ciolib.c:1515
    #6 0x00005555556eb1c0 in cterm_write (cterm=0x555555e61870, vbuf=0x7fffffff4f10, buflen=4, retbuf=0x555555bc3300 <ansi_replybuf> "", retsize=2048,
    speed=0x7fffffff4efc) at cterm.c:5197
    #7 0x0000555555584da4 in doterm (bbs=0x555555bbc040 <retlist>) at
    term.c:2579
    #8 0x00005555555912cc in main (argc=1, argv=0x7fffffffdea8) at
    syncterm.c:1673
    (gdb) c
    Continuing.
    [Thread 0x7fffe56d0700 (LWP 31011) exited]
    c^C
    Thread 1 "Main Thread" received signal SIGINT, Interrupt.
    __lll_lock_wait () at ../sysdeps/unix/sysv/linux/x86_64/lowlevellock.S:135
    135 in ../sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
    (gdb) bt
    #0 __lll_lock_wait () at
    ../sysdeps/unix/sysv/linux/x86_64/lowlevellock.S:135
    #1 0x00007ffff7060bb5 in __GI___pthread_mutex_lock
    (mutex=0x555555c230c0 <sample_mutex>) at ../nptl/pthread_mutex_lock.c:80
    #2 0x000055555570f805 in xp_play_sample (
    sample=0x555555bf1440 <wave> "~\177\177\200\200\201\201\200\200\177}zywvuuuuvvuuutrqqppoooppponljhfdcbbcfhlpx|z\202\210\211\210\203zria[VSSSSUUUSQMIE@><;;<>>>;81*!\031\020\n\a\a\f\023\037+;^ly\202\210\212\207\203|skb\\VTRSSUUTTQNIEB><<;<>>=<81*\"\031\021\v\b\a\v\022\034+8[kw\202\210\212\210\204}tkc]WSRRSUUUTRNJFA><;;<=>?<92+$\033\022\f\b\006\n\020\034("...,
    size=2205, background=1) at xpbeep.c:924
    #3 0x00005555556f4237 in sdl_beep () at sdl_con.c:1052
    #4 0x00005555556d7403 in ciolib_beep () at ciolib.c:1716
    #5 0x00005555556d6af9 in ciolib_putch (ch=7) at ciolib.c:1515
    #6 0x00005555556eb1c0 in cterm_write (cterm=0x555555e61870, vbuf=0x7fffffff4f10, buflen=4, retbuf=0x555555bc3300 <ansi_replybuf> "", retsize=2048,
    speed=0x7fffffff4efc) at cterm.c:5197
    #7 0x0000555555584da4 in doterm (bbs=0x555555bbc040 <retlist>) at
    term.c:2579
    #8 0x00005555555912cc in main (argc=1, argv=0x7fffffffdea8) at
    syncterm.c:1673
    (gdb) c
    Continuing.


    Saludos! and thanks!



    ---
    � Synchronet � Vertrauen � Home of Synchronet � [vert/cvs/bbs].synchro.net


    ---
    ï¿­ Synchronet ï¿­ Dock Sud BBS TLD 24 HS - bbs.docksud.com.ar
  • From deuce@VERT to CVS commit on Fri Apr 17 10:15:26 2020
    src/conio sdl_con.c 1.288 1.289
    Update of /cvsroot/sbbs/src/conio
    In directory cvs:/tmp/cvs-serv19397

    Modified Files:
    sdl_con.c
    Log Message:
    Return the UTF-8 clipboard test.




    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From deuce@VERT to CVS commit on Mon Apr 20 14:46:21 2020
    src/conio sdl_con.c 1.290 1.291
    Update of /cvsroot/sbbs/src/conio
    In directory cvs:/tmp/cvs-serv5914

    Modified Files:
    sdl_con.c
    Log Message:
    Translate non-printing input characters using the codepage, don't assume anything that doesn't print is "fine".




    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From deuce@VERT to CVS commit on Mon Apr 27 18:02:53 2020
    src/conio sdl_con.c 1.297 1.298
    Update of /cvsroot/sbbs/src/conio
    In directory cvs:/tmp/cvs-serv30415

    Modified Files:
    sdl_con.c
    Log Message:
    Don't treat keysyms as though they are unicode (they aren't).




    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net