From 3f813cf1ef69808cd00d8c932df4a153f3f96a95 Mon Sep 17 00:00:00 2001 From: Ozkan Sezer Date: Wed, 4 May 2022 10:05:56 +0300 Subject: [PATCH] SDL_rawinputjoystick.c: fixed -Werror=declaration-after-statement --- src/joystick/windows/SDL_rawinputjoystick.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/joystick/windows/SDL_rawinputjoystick.c b/src/joystick/windows/SDL_rawinputjoystick.c index 4795733f3..e28fea098 100644 --- a/src/joystick/windows/SDL_rawinputjoystick.c +++ b/src/joystick/windows/SDL_rawinputjoystick.c @@ -1586,14 +1586,17 @@ RAWINPUT_UpdateOtherAPIs(SDL_Joystick *joystick) int guide_button = joystick->nbuttons - 1; int left_trigger = joystick->naxes - 2; int right_trigger = joystick->naxes - 1; +#ifdef SDL_JOYSTICK_RAWINPUT_WGI + SDL_bool xinput_correlated; +#endif RAWINPUT_FillMatchState(&match_state_xinput, ctx->match_state); #ifdef SDL_JOYSTICK_RAWINPUT_WGI #ifdef SDL_JOYSTICK_RAWINPUT_XINPUT - SDL_bool xinput_correlated = ctx->xinput_correlated; + xinput_correlated = ctx->xinput_correlated; #else - SDL_bool xinput_correlated = SDL_FALSE; + xinput_correlated = SDL_FALSE; #endif /* Parallel logic to WINDOWS_XINPUT below */ RAWINPUT_UpdateWindowsGamingInput();