Reset enhanced mode state when closing a controller
Fixes https://github.com/libsdl-org/SDL/issues/11912
This commit is contained in:
parent
b524af1b43
commit
21cc1878f1
3 changed files with 12 additions and 0 deletions
|
@ -2766,6 +2766,10 @@ static void HIDAPI_DriverSwitch_CloseJoystick(SDL_HIDAPI_Device *device, SDL_Joy
|
|||
SDL_PlayerLEDHintChanged, ctx);
|
||||
|
||||
ctx->joystick = NULL;
|
||||
|
||||
ctx->m_bReportSensors = false;
|
||||
ctx->m_bEnhancedMode = false;
|
||||
ctx->m_bEnhancedModeAvailable = false;
|
||||
}
|
||||
|
||||
static void HIDAPI_DriverSwitch_FreeDevice(SDL_HIDAPI_Device *device)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue