diff options
author | WBoerenkamps <wrj.boerenkamps@student.avans.nl> | 2024-11-27 14:51:55 +0100 |
---|---|---|
committer | WBoerenkamps <wrj.boerenkamps@student.avans.nl> | 2024-11-27 14:51:55 +0100 |
commit | 137b36ded2d67e0ff636fe4e936e16d5a7a3e90f (patch) | |
tree | d6c25a35efe7ffa39fe307afb2e11ec5621db10b /src/crepe/facade | |
parent | 8554de0ebd75aea3c4b25d2fc211ad3a904f741b (diff) |
small {} changes
Diffstat (limited to 'src/crepe/facade')
-rw-r--r-- | src/crepe/facade/SDLContext.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
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::EventData> 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); |