Some Controller fixes #207

Merged
alufolie91 merged 9 commits from controllerfixes into Saturn-Next 2025-11-14 14:47:27 +01:00
alufolie91 commented 2025-10-24 18:51:32 +02:00 (Migrated from github.com)

Cleans up the Controller Dpad input handling, previously this was handled with a seperate polling loop in a weird manner.
Now we instead handle it per special case in Controller button event handling.

The game now keeps track of controller indice id´s in the JoyInfo struct, this means we dont need to refetch them constantly in every controller handler

This also sets the SDL_HINT_AUTO_UPDATE_SENSORS hint to 0, as we dont need any gyro sensors and alike, might slightly improve performance

And at last this also refactors the Menu scoll handling for controller dpads to use SDL functions to check if a dpad button is being pressed instead of manually checking for keyup and keydown events and keeping track of them'

https://github.com/Indev450/SRB2Kart-Saturn/pull/204 probably should be merged first as there used to be issues with controller indices on Windows, but those may be already fixed in our current SDL2 version

Cleans up the Controller Dpad input handling, previously this was handled with a seperate polling loop in a weird manner. Now we instead handle it per special case in Controller button event handling. The game now keeps track of controller indice id´s in the JoyInfo struct, this means we dont need to refetch them constantly in every controller handler This also sets the SDL_HINT_AUTO_UPDATE_SENSORS hint to 0, as we dont need any gyro sensors and alike, might slightly improve performance And at last this also refactors the Menu scoll handling for controller dpads to use SDL functions to check if a dpad button is being pressed instead of manually checking for keyup and keydown events and keeping track of them' https://github.com/Indev450/SRB2Kart-Saturn/pull/204 probably should be merged first as there used to be issues with controller indices on Windows, but those may be already fixed in our current SDL2 version
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: saturn/SRB2Kart-Saturn#207