From 137b36ded2d67e0ff636fe4e936e16d5a7a3e90f Mon Sep 17 00:00:00 2001 From: WBoerenkamps Date: Wed, 27 Nov 2024 14:51:55 +0100 Subject: small {} changes --- src/crepe/facade/SDLContext.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src/crepe/facade/SDLContext.cpp') diff --git a/src/crepe/facade/SDLContext.cpp b/src/crepe/facade/SDLContext.cpp index 512e858..735ed70 100644 --- a/src/crepe/facade/SDLContext.cpp +++ b/src/crepe/facade/SDLContext.cpp @@ -336,15 +336,13 @@ std::vector SDLContext::get_events() { .key = sdl_to_keycode(event.key.keysym.scancode), }); break; - case SDL_MOUSEBUTTONDOWN: { - int x, y; - SDL_GetMouseState(&x, &y); + case SDL_MOUSEBUTTONDOWN: event_list.push_back(EventData{ .event_type = SDLContext::EventType::MOUSEDOWN, .mouse_button = sdl_to_mousebutton(event.button.button), .mouse_position = {event.button.x, event.button.y}, }); - } break; + break; case SDL_MOUSEBUTTONUP: { int x, y; SDL_GetMouseState(&x, &y); -- cgit v1.2.3