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:
Sam Lantinga committed 2024-09-09 14:00:19 -07:00
1 parent 7d1bbae6b2
commit 6fc6e3dc7e
89 files changed
+935 -956

No files matched your search

+1 -1
View File
@@ -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);