From d6495550f54207ebf675e61d94cb43f425195459 Mon Sep 17 00:00:00 2001 From: IvanDSM Date: Sun, 17 May 2020 22:37:52 -0300 Subject: [PATCH] Release mouse when paused --- src/pc/controller/controller_sdl.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/pc/controller/controller_sdl.c b/src/pc/controller/controller_sdl.c index 62aa2acf..cbdd6178 100644 --- a/src/pc/controller/controller_sdl.c +++ b/src/pc/controller/controller_sdl.c @@ -14,6 +14,8 @@ #include "controller_sdl.h" #include "../configfile.h" +#include "game/level_update.h" + // mouse buttons are also in the controller namespace (why), just offset 0x100 #define VK_OFS_SDL_MOUSE 0x0100 #define VK_BASE_SDL_MOUSE (VK_BASE_SDL_GAMEPAD + VK_OFS_SDL_MOUSE) @@ -101,7 +103,7 @@ static void controller_sdl_read(OSContPad *pad) { } #ifdef BETTERCAMERA - if (newcam_mouse == 1) + if (newcam_mouse == 1 && sCurrPlayMode != 2) SDL_SetRelativeMouseMode(SDL_TRUE); else SDL_SetRelativeMouseMode(SDL_FALSE);