mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-09-06 03:18:13 +00:00
joystick: Fix PS5 player LED hint change callback name
The LED hint was getting registered for SDL_HINT_JOYSTICK_ENHANCED_REPORTS instead of SDL_HINT_JOYSTICK_HIDAPI_PS5_PLAYER_LED, which results in a use-after-free followed by a crash.
This commit is contained in:
@@ -952,7 +952,7 @@ static bool HIDAPI_DriverPS5_OpenJoystick(SDL_HIDAPI_Device *device, SDL_Joystic
|
|||||||
|
|
||||||
SDL_AddHintCallback(SDL_HINT_JOYSTICK_ENHANCED_REPORTS,
|
SDL_AddHintCallback(SDL_HINT_JOYSTICK_ENHANCED_REPORTS,
|
||||||
SDL_PS5EnhancedReportsChanged, ctx);
|
SDL_PS5EnhancedReportsChanged, ctx);
|
||||||
SDL_AddHintCallback(SDL_HINT_JOYSTICK_ENHANCED_REPORTS,
|
SDL_AddHintCallback(SDL_HINT_JOYSTICK_HIDAPI_PS5_PLAYER_LED,
|
||||||
SDL_PS5PlayerLEDHintChanged, ctx);
|
SDL_PS5PlayerLEDHintChanged, ctx);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
Reference in New Issue
Block a user