fix cursor lock on alt+tab

(cherry picked from commit 6a38496bf7)
This commit is contained in:
FunkyFr3sh 2021-11-27 17:38:22 +01:00
parent 4a0d74001a
commit aca2ca7071
2 changed files with 2 additions and 1 deletions

View file

@ -13,7 +13,7 @@ void mouse_lock()
if (g_ddraw->devmode || g_ddraw->bnet_active)
return;
if (g_hook_active && !g_ddraw->locked)
if (g_hook_active && !g_ddraw->locked && !IsIconic(g_ddraw->hwnd))
{
int game_count = InterlockedExchangeAdd((LONG*)&g_ddraw->show_cursor_count, 0);
int cur_count = real_ShowCursor(TRUE) - 1;