mirror of
https://github.com/FunkyFr3sh/cnc-ddraw.git
synced 2025-03-25 01:57:47 +01:00
allow cursor unlock while video is playing
This commit is contained in:
parent
743907669e
commit
65969de0bd
@ -709,12 +709,6 @@ LRESULT CALLBACK fake_WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam
|
|||||||
}
|
}
|
||||||
case WM_KEYDOWN:
|
case WM_KEYDOWN:
|
||||||
{
|
{
|
||||||
if (g_ddraw->video_window_exists)
|
|
||||||
{
|
|
||||||
if (wParam != VK_ESCAPE)
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (g_config.hotkeys.unlock_cursor1 &&
|
if (g_config.hotkeys.unlock_cursor1 &&
|
||||||
(wParam == VK_CONTROL || wParam == g_config.hotkeys.unlock_cursor1))
|
(wParam == VK_CONTROL || wParam == g_config.hotkeys.unlock_cursor1))
|
||||||
{
|
{
|
||||||
@ -735,19 +729,25 @@ LRESULT CALLBACK fake_WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case WM_KEYUP:
|
|
||||||
{
|
|
||||||
if (g_ddraw->video_window_exists)
|
if (g_ddraw->video_window_exists)
|
||||||
{
|
{
|
||||||
if (wParam != VK_ESCAPE)
|
if (wParam != VK_ESCAPE)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case WM_KEYUP:
|
||||||
|
{
|
||||||
if (g_config.hotkeys.screenshot && wParam == g_config.hotkeys.screenshot)
|
if (g_config.hotkeys.screenshot && wParam == g_config.hotkeys.screenshot)
|
||||||
ss_take_screenshot(g_ddraw->primary);
|
ss_take_screenshot(g_ddraw->primary);
|
||||||
|
|
||||||
|
if (g_ddraw->video_window_exists)
|
||||||
|
{
|
||||||
|
if (wParam != VK_ESCAPE)
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
/* button up messages reactivate cursor lock */
|
/* button up messages reactivate cursor lock */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user