aboutsummaryrefslogtreecommitdiff
path: root/src/crepe/facade/SDLContext.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/crepe/facade/SDLContext.cpp')
-rw-r--r--src/crepe/facade/SDLContext.cpp6
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);