aboutsummaryrefslogtreecommitdiffstats
path: root/src/window/Events.cpp
diff options
context:
space:
mode:
authorJoursoir <chat@joursoir.net>2021-04-04 14:04:23 +0000
committerJoursoir <chat@joursoir.net>2021-04-04 14:04:23 +0000
commit685ff91f73d4aa437d801e0c93dee2b904eb8880 (patch)
tree122b01080ea2958e6e1a7a68fa93bf0bc439f707 /src/window/Events.cpp
parent60271422194afae4a9c89dceaed5c2d53c51ff00 (diff)
downloadspace-simulator-685ff91f73d4aa437d801e0c93dee2b904eb8880.tar.gz
space-simulator-685ff91f73d4aa437d801e0c93dee2b904eb8880.tar.bz2
space-simulator-685ff91f73d4aa437d801e0c93dee2b904eb8880.zip
Window & Events: cursor mode improve
Diffstat (limited to 'src/window/Events.cpp')
-rw-r--r--src/window/Events.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/window/Events.cpp b/src/window/Events.cpp
index 8799853..f6ffe61 100644
--- a/src/window/Events.cpp
+++ b/src/window/Events.cpp
@@ -78,6 +78,9 @@ void Events::KeyHandle(int key, int scancode, int action, int mode)
void Events::CursorPosHandle(double xpos, double ypos)
{
+ if(master->GetCursorMode() == GLFW_CURSOR_NORMAL)
+ return;
+
delta_x = xpos - x;
delta_y = ypos - y;