mirror of
https://github.com/yquake2/yquake2remaster.git
synced 2024-11-25 14:00:58 +00:00
Do not update mouse cursor position when paused, in menu, etc
This commit is contained in:
parent
5d4c165b19
commit
1e52d35e84
1 changed files with 5 additions and 2 deletions
|
@ -28,6 +28,7 @@
|
|||
#include "../../client/refresh/header/local.h"
|
||||
#include "../../client/header/keyboard.h"
|
||||
#include "../generic/header/input.h"
|
||||
#include "../../client/header/client.h"
|
||||
|
||||
/* There's no sdl-config on OS X and Windows */
|
||||
#if defined(_WIN32) || defined(__APPLE__)
|
||||
|
@ -407,8 +408,10 @@ IN_Update(void)
|
|||
SDL_WarpMouseInWindow(NULL, center_x, center_y);
|
||||
}
|
||||
#endif
|
||||
mouse_x += event.motion.xrel;
|
||||
mouse_y += event.motion.yrel;
|
||||
if (cls.key_dest == key_game && (int)cl_paused->value == 0) {
|
||||
mouse_x += event.motion.xrel;
|
||||
mouse_y += event.motion.yrel;
|
||||
}
|
||||
break;
|
||||
|
||||
/* The user pressed a button */
|
||||
|
|
Loading…
Reference in a new issue