From 268aa456455ff31cab89396ceee8db61afffd3d7 Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Mon, 23 Nov 2020 20:26:28 -0800 Subject: [PATCH] Fixed compiling with SDL_JOYSTICK_RAWINPUT disabled --- src/joystick/windows/SDL_xinputjoystick.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/joystick/windows/SDL_xinputjoystick.c b/src/joystick/windows/SDL_xinputjoystick.c index 40ba799fa..eb90652c8 100644 --- a/src/joystick/windows/SDL_xinputjoystick.c +++ b/src/joystick/windows/SDL_xinputjoystick.c @@ -65,10 +65,12 @@ SDL_XINPUT_JoystickInit(void) { s_bXInputEnabled = SDL_GetHintBoolean(SDL_HINT_XINPUT_ENABLED, SDL_TRUE); +#ifdef SDL_JOYSTICK_RAWINPUT if (RAWINPUT_IsEnabled()) { /* The raw input driver handles more than 4 controllers, so prefer that when available */ s_bXInputEnabled = SDL_FALSE; } +#endif if (s_bXInputEnabled && WIN_LoadXInputDLL() < 0) { s_bXInputEnabled = SDL_FALSE; /* oh well. */