Fixed a crash when unplugging a Steam Controller dongle
Some checks are pending
Build (All) / Create test plan (push) Waiting to run
Build (All) / level1 (push) Blocked by required conditions
Build (All) / level2 (push) Blocked by required conditions

This commit is contained in:
Sam Lantinga 2024-11-18 12:13:29 -08:00
parent 70fe38bcb2
commit 184da780f5

View file

@ -1250,7 +1250,9 @@ static void ControllerDisconnected(SDL_HIDAPI_Device *device, SDL_Joystick **joy
{
SDL_DriverSteam_Context *ctx = (SDL_DriverSteam_Context *)device->context;
if (device->joysticks) {
HIDAPI_JoystickDisconnected(device, device->joysticks[0]);
}
ctx->connected = false;
*joystick = NULL;
}