Fixed incorrect WGI controller state when the application loses focus

Recenter the controller elements when WGI stops reporting valid state

Fixes https://github.com/libsdl-org/SDL/issues/5261
This commit is contained in:
Sam Lantinga 2022-11-11 08:57:07 -08:00
parent 875e9b35d7
commit b7e65a81f1
3 changed files with 21 additions and 8 deletions

View file

@ -1432,7 +1432,7 @@ static void UpdateEventsForDeviceRemoval(int device_index, Uint32 type)
SDL_small_free(events, isstack);
}
static void
void
SDL_PrivateJoystickForceRecentering(SDL_Joystick *joystick)
{
int i, j;