only lock cursor in borderless if game window is the foreground window

This commit is contained in:
FunkyFr3sh 2022-09-20 08:59:36 +02:00
parent c6701a8cd6
commit 1b791fb2cb
7 changed files with 27 additions and 24 deletions

View file

@ -117,7 +117,6 @@ typedef struct CNCDDRAW
HWND hwnd;
WNDPROC wndproc;
struct { DWORD x; DWORD y; } cursor;
BOOL locked;
BOOL adjmouse;
BOOL devmode;
BOOL vsync;

View file

@ -5,6 +5,7 @@ void mouse_lock();
void mouse_unlock();
LRESULT CALLBACK mouse_hook_proc(int Code, WPARAM wParam, LPARAM lParam);
extern BOOL g_mouse_locked;
extern HHOOK g_mouse_hook;
extern HOOKPROC g_mouse_proc;