summaryrefslogtreecommitdiffstats
path: root/src/Render.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/Render.cpp')
-rw-r--r--src/Render.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Render.cpp b/src/Render.cpp
index c905bd9..5c00d91 100644
--- a/src/Render.cpp
+++ b/src/Render.cpp
@@ -245,7 +245,7 @@ void Render::HandleEvents() {
}
case SDL_MOUSEBUTTONDOWN: {
- if (!ImGui::GetIO().WantCaptureMouse) {
+ if (isMouseCaptured && !ImGui::GetIO().WantCaptureMouse) {
if (event.button.button == SDL_BUTTON_LEFT)
PUSH_EVENT("LmbPressed", 0);
else if (event.button.button == SDL_BUTTON_RIGHT)
@@ -256,7 +256,7 @@ void Render::HandleEvents() {
}
case SDL_MOUSEBUTTONUP: {
- if (!ImGui::GetIO().WantCaptureMouse) {
+ if (isMouseCaptured && !ImGui::GetIO().WantCaptureMouse) {
if (event.button.button == SDL_BUTTON_LEFT)
PUSH_EVENT("LmbReleased", 0);
else if (event.button.button == SDL_BUTTON_RIGHT)