From 4f767ea669d2fe0afc599bef48b90843fa05d709 Mon Sep 17 00:00:00 2001 From: Srinivasa Date: Sun, 13 Sep 2020 12:40:25 +0530 Subject: [PATCH] Change cursor confining logic --- NonEuclidean/Engine_SDL2.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/NonEuclidean/Engine_SDL2.cpp b/NonEuclidean/Engine_SDL2.cpp index 68bb66a..0819f76 100644 --- a/NonEuclidean/Engine_SDL2.cpp +++ b/NonEuclidean/Engine_SDL2.cpp @@ -93,8 +93,7 @@ void Engine::EnableVSync() { int Engine::EnterMessageLoop() { if (GH_HIDE_MOUSE) { - SDL_SetWindowGrab(window,SDL_TRUE); - SDL_ShowCursor(SDL_DISABLE); + SDL_SetRelativeMouseMode(SDL_TRUE); } //Setup the timer ticks_per_step = timer.SecondsToTicks(GH_DT);