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:
@@ -285,7 +285,7 @@ static void HandleMouseButton(SDL_MouseButtonEvent *event)
|
||||
continue;
|
||||
}
|
||||
if (event->which == mouse_state->instance_id) {
|
||||
if (event->state) {
|
||||
if (event->down) {
|
||||
mouse_state->button_state |= SDL_BUTTON(event->button);
|
||||
} else {
|
||||
mouse_state->button_state &= ~SDL_BUTTON(event->button);
|
||||
|
||||
Reference in New Issue
Block a user