From 42b6d6011515efe1181990708974473198c1e8a3 Mon Sep 17 00:00:00 2001 From: Eukara Date: Wed, 21 Jul 2021 11:48:31 +0000 Subject: [PATCH] Register binds for SC_LPADDLE and SC_RPADDLE, fix joy button detection. git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@5986 fc73d0e0-1445-4013-8a0c-d673dee63da5 --- engine/client/in_sdl.c | 2 +- engine/client/keys.c | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/engine/client/in_sdl.c b/engine/client/in_sdl.c index a94de2534..f528a3621 100644 --- a/engine/client/in_sdl.c +++ b/engine/client/in_sdl.c @@ -984,7 +984,7 @@ void Sys_SendKeyEvents(void) // break; case SDL_JOYBUTTONDOWN: case SDL_JOYBUTTONUP: - J_JoystickButton(event.jbutton.which, event.jbutton.button, (event.type==SDL_CONTROLLERBUTTONDOWN) ? 1 : 0); + J_JoystickButton(event.jbutton.which, event.jbutton.button, event.type==SDL_JOYBUTTONDOWN); break; case SDL_JOYDEVICEADDED: J_JoystickAdded(event.jdevice.which); diff --git a/engine/client/keys.c b/engine/client/keys.c index b474c8b33..74ae75d8b 100644 --- a/engine/client/keys.c +++ b/engine/client/keys.c @@ -340,6 +340,10 @@ keyname_t keynames[] = {"RTRIGGER", K_GP_RIGHT_TRIGGER}, #endif + /* Steam Controller */ + {"SC_LPADDLE", K_AUX12}, + {"SC_RPADDLE", K_AUX13}, + {NULL, 0} };