From 5e682d612f02a180c2588358c7fbe6504750b9c0 Mon Sep 17 00:00:00 2001 From: wolfy852 Date: Wed, 9 Jan 2019 01:38:28 -0600 Subject: [PATCH 1/2] -noxinput command line parameter --- src/sdl/i_system.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/sdl/i_system.c b/src/sdl/i_system.c index f8517618..6f5e265b 100644 --- a/src/sdl/i_system.c +++ b/src/sdl/i_system.c @@ -2166,6 +2166,9 @@ void I_InitJoystick(void) if (M_CheckParm("-nojoy")) return; + if (M_CheckParm("-noxinput")) + SDL_SetHintWithPriority("SDL_XINPUT_ENABLED", "0", SDL_HINT_OVERRIDE); + if (SDL_WasInit(SDL_INIT_JOYSTICK) == 0) { CONS_Printf("I_InitJoystick()...\n"); From a8e080526168a1ae0429b48ad3c27f5c105c211e Mon Sep 17 00:00:00 2001 From: wolfy852 Date: Thu, 10 Jan 2019 23:12:06 -0600 Subject: [PATCH 2/2] -nohidapi parameter Should fix problems where Switch Pro controllers suddenly had their mappings changed. Does not recognize controllers connected before game launch. Make sure to replug your controller after the game launches if using this param. --- src/sdl/i_system.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/sdl/i_system.c b/src/sdl/i_system.c index 6f5e265b..2154a070 100644 --- a/src/sdl/i_system.c +++ b/src/sdl/i_system.c @@ -2169,6 +2169,9 @@ void I_InitJoystick(void) if (M_CheckParm("-noxinput")) SDL_SetHintWithPriority("SDL_XINPUT_ENABLED", "0", SDL_HINT_OVERRIDE); + if (M_CheckParm("-nohidapi")) + SDL_SetHintWithPriority("SDL_JOYSTICK_HIDAPI", "0", SDL_HINT_OVERRIDE); + if (SDL_WasInit(SDL_INIT_JOYSTICK) == 0) { CONS_Printf("I_InitJoystick()...\n");