Reset enhanced mode state when closing a controller

Fixes https://github.com/libsdl-org/SDL/issues/11912
This commit is contained in:
Sam Lantinga
2025-01-12 10:45:54 -08:00
parent b524af1b43
commit 21cc1878f1
3 changed files with 12 additions and 0 deletions

View File

@@ -1587,6 +1587,10 @@ static void HIDAPI_DriverPS5_CloseJoystick(SDL_HIDAPI_Device *device, SDL_Joysti
SDL_PS5PlayerLEDHintChanged, ctx);
ctx->joystick = NULL;
ctx->report_sensors = false;
ctx->enhanced_mode = false;
ctx->enhanced_mode_available = false;
}
static void HIDAPI_DriverPS5_FreeDevice(SDL_HIDAPI_Device *device)