mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-10-16 06:45:59 +00:00
Use SDL_bool where appropriate in SDL events
This involved changing button state from Uint8 to SDL_bool, and made SDL_PRESSED and SDL_RELEASED unnecessary. Fixes https://github.com/libsdl-org/SDL/issues/10069
This commit is contained in:
@@ -967,10 +967,7 @@ static void DARWIN_JoystickUpdate(SDL_Joystick *joystick)
|
||||
while (element) {
|
||||
goodRead = GetHIDElementState(device, element, &value);
|
||||
if (goodRead) {
|
||||
if (value > 1) { // handle pressure-sensitive buttons
|
||||
value = 1;
|
||||
}
|
||||
SDL_SendJoystickButton(timestamp, joystick, i, value);
|
||||
SDL_SendJoystickButton(timestamp, joystick, i, (value != 0));
|
||||
}
|
||||
|
||||
element = element->pNext;
|
||||
|
Reference in New Issue
Block a user