• src/doors/syncretro/syncretro_games.c syncretro_games.h test_games.csr

    From Rob Swindell (on Debian Linux)@VERT to Git commit to main/sbbs/master on Fri Jul 24 11:06:27 2026
    https://gitlab.synchro.net/main/sbbs/-/commit/81c14a490016b1e9ce22e11a
    Added Files:
    src/doors/syncretro/syncretro_games.c syncretro_games.h test_games.c Modified Files:
    src/doors/syncretro/CMakeLists.txt
    Log Message:
    syncretro: add games.ini reader for per-cabinet button labels

    MAME 2003-Plus reports how many buttons a driver wants but never
    sends SET_INPUT_DESCRIPTORS, so the door can learn that a cabinet has
    buttons but not what any of them IS. Measured by hand: Battlezone
    fires on RetroPad Y, Centipede on B -- there is no rule to infer the
    mapping, only games.ini, entered by hand per romset.

    Add syncretro_games.[ch]: sr_games_load() reads <dir>/games.ini and
    selects the section named by the ROM's basename, sr_games_button_label()
    and sr_games_stick2() answer NULL when nothing is recorded, and sr_games_labelled() reports whether any button was labelled at all.
    State is cleared unconditionally at the top of sr_games_load(), before
    any early return, so a console with no games.ini cannot inherit the
    previously loaded cabinet's labels.

    Add test_games.c and wire it into the SYNCRETRO_TESTS CMake target;
    all seven unit tests still pass. Wiring the labels into the door's
    help screen is a later task -- this is a standalone, tested module.

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