Add keys for SDL 2.0.14's new gamepad buttons
This fixes the additional buttons triggering binds for ioq3 left and right joystick direction keys.
This commit is contained in:
1 parent
29b0cc3a4d
commit
f92c293f7b
3 files changed
+22
-1
No files matched your search
@@ -657,7 +657,14 @@ static void IN_GamepadMove( void )
|
||||
qboolean pressed = SDL_GameControllerGetButton(gamepad, SDL_CONTROLLER_BUTTON_A + i);
|
||||
if (pressed != stick_state.buttons[i])
|
||||
{
|
||||
Com_QueueEvent(in_eventTime, SE_KEY, K_PAD0_A + i, pressed, 0, NULL);
|
||||
#if SDL_VERSION_ATLEAST( 2, 0, 14 )
|
||||
if ( i >= SDL_CONTROLLER_BUTTON_MISC1 ) {
|
||||
Com_QueueEvent(in_eventTime, SE_KEY, K_PAD0_MISC1 + i - SDL_CONTROLLER_BUTTON_MISC1, pressed, 0, NULL);
|
||||
} else
|
||||
#endif
|
||||
{
|
||||
Com_QueueEvent(in_eventTime, SE_KEY, K_PAD0_A + i, pressed, 0, NULL);
|
||||
}
|
||||
stick_state.buttons[i] = pressed;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user