SDL_rawinputjoystick.c: fixed -Werror=declaration-after-statement

This commit is contained in:
Ozkan Sezer 2022-05-04 10:05:56 +03:00
parent 2021a10927
commit 3f813cf1ef
1 changed files with 5 additions and 2 deletions

View File

@ -1586,14 +1586,17 @@ RAWINPUT_UpdateOtherAPIs(SDL_Joystick *joystick)
int guide_button = joystick->nbuttons - 1; int guide_button = joystick->nbuttons - 1;
int left_trigger = joystick->naxes - 2; int left_trigger = joystick->naxes - 2;
int right_trigger = joystick->naxes - 1; int right_trigger = joystick->naxes - 1;
#ifdef SDL_JOYSTICK_RAWINPUT_WGI
SDL_bool xinput_correlated;
#endif
RAWINPUT_FillMatchState(&match_state_xinput, ctx->match_state); RAWINPUT_FillMatchState(&match_state_xinput, ctx->match_state);
#ifdef SDL_JOYSTICK_RAWINPUT_WGI #ifdef SDL_JOYSTICK_RAWINPUT_WGI
#ifdef SDL_JOYSTICK_RAWINPUT_XINPUT #ifdef SDL_JOYSTICK_RAWINPUT_XINPUT
SDL_bool xinput_correlated = ctx->xinput_correlated; xinput_correlated = ctx->xinput_correlated;
#else #else
SDL_bool xinput_correlated = SDL_FALSE; xinput_correlated = SDL_FALSE;
#endif #endif
/* Parallel logic to WINDOWS_XINPUT below */ /* Parallel logic to WINDOWS_XINPUT below */
RAWINPUT_UpdateWindowsGamingInput(); RAWINPUT_UpdateWindowsGamingInput();