cc  -O2 -g -std=c99 -Wall -Wextra -Wpedantic -I/mnt/data/work/sdl-prefix/include  -Isrc src/core.c src/app.c src/render.c src/audio.c src/fm_synth.c src/music.c src/controller.c tests/test_rebinding.c -L/mnt/data/work/sdl-prefix/lib -Wl,-rpath,/mnt/data/work/sdl-prefix/lib -Wl,--enable-new-dtags -lSDL3  -lm   -o build/test-rebinding
SDL_VIDEODRIVER=offscreen SDL_RENDER_DRIVER=software SDL_AUDIODRIVER=dummy ./build/test-rebinding
Controller: NO CONTROLLER - KEYBOARD AVAILABLE
Controller: Legacy raw USB controls (virtual fixture) / GUID ff0072d9091200000570000000007604
Controller input: raw=yes mapped=no axes=3 buttons=10 hats=1
Controller raw button 0 down (page=0 column=0 capture=-1)
Controller raw button 0 up (page=3 column=1 capture=-1)
Controller raw button 0 down (page=3 column=1 capture=-1)
Controller capture armed: action=4 device=Legacy raw USB controls (virtual fixture) raw=yes
Controller raw button 0 up (page=3 column=1 capture=4)
Controller raw button 9 down (page=3 column=1 capture=4)
Controller capture accepted (event): action=4 BUTTON 9 rest=0
Controller raw button 9 up (page=3 column=1 capture=-1)
Controller raw button 0 down (page=3 column=0 capture=-1)
Controller raw button 0 up (page=3 column=0 capture=4)
Controller raw button 8 down (page=3 column=0 capture=4)
Controller raw button 8 up (page=3 column=0 capture=4)
Controller capture armed: action=5 device=Legacy raw USB controls (virtual fixture) raw=yes
Controller capture accepted (polled state): action=5 BUTTON 8 rest=0
Controller raw button 8 up (page=3 column=1 capture=-1)
Controller capture armed: action=6 device=Legacy raw USB controls (virtual fixture) raw=yes
Controller capture accepted (polled state): action=6 BUTTON 0 rest=0
Controller raw button 0 up (page=3 column=1 capture=-1)
Controller capture armed: action=7 device=Legacy raw USB controls (virtual fixture) raw=yes
Controller capture accepted (polled state): action=7 AXIS 2 + rest=-32768
Controller capture armed: action=0 device=Legacy raw USB controls (virtual fixture) raw=yes
Controller capture accepted (polled state): action=0 HAT 0 UP rest=0
Controller raw hat 0 value=0
Controller capture armed: action=4 device=Legacy raw USB controls (virtual fixture) raw=yes
Controller raw button 7 down (page=3 column=1 capture=-1)
Controller raw button 7 up (page=3 column=1 capture=-1)
Controller capture armed: action=4 device=Legacy raw USB controls (virtual fixture) raw=yes
Controller raw button 7 down (page=3 column=1 capture=4)
Controller capture accepted (event): action=4 BUTTON 7 rest=0
Controller raw button 7 up (page=3 column=1 capture=-1)
Controller: NO CONTROLLER - KEYBOARD AVAILABLE
Controller: Legacy raw USB controls (virtual fixture) / GUID ff0072d9091200000570000000007604
Controller input: raw=yes mapped=no axes=3 buttons=10 hats=1
Controller: NO CONTROLLER - KEYBOARD AVAILABLE
Controller: Legacy raw USB controls (virtual fixture) / GUID ff0072d9091200000570000000007604
Controller input: raw=yes mapped=yes axes=3 buttons=10 hats=1
PASS: actual title-to-Controls flow selects controller; extra raw button binds; keyboard editing remains available
PASS: missing button/hat/axis edges use raw state; ignored opening release recovers; resting trigger, diagonal-hat and cancel guards preserved
PASS: press/release between fixed updates is captured once and cannot reopen the dialog
PASS: GUID profile survives restart; extra unmapped buttons bind through raw input even alongside a Gamepad handle
ALL REBINDING REGRESSIONS PASSED: 106 assertions (virtual devices only)
