mirror of
https://github.com/RetroDECK/Duckstation.git
synced 2024-11-30 09:35:40 +00:00
SDLControllerInterface: Prefer cbutton.which for button events
Functionally the same as caxis.which due to SDL_Event union, but prefer using SDL_ControllerButtonEvent members for button events.
This commit is contained in:
parent
d996f46618
commit
0a0a2024fd
|
@ -319,7 +319,7 @@ bool SDLControllerInterface::HandleControllerButtonEvent(const SDL_Event* ev)
|
|||
Log_DebugPrintf("controller %d button %d %s", ev->cbutton.which, ev->cbutton.button,
|
||||
ev->cbutton.state == SDL_PRESSED ? "pressed" : "released");
|
||||
|
||||
auto it = GetControllerDataForJoystickId(ev->caxis.which);
|
||||
auto it = GetControllerDataForJoystickId(ev->cbutton.which);
|
||||
if (it == m_controllers.end())
|
||||
return false;
|
||||
|
||||
|
|
Loading…
Reference in a new issue