fixes for cursor lock

This commit is contained in:
FunkyFr3sh 2021-06-17 04:12:05 +02:00
parent a04e8f4e1f
commit 6cfeadaced
7 changed files with 56 additions and 24 deletions

View file

@ -97,9 +97,14 @@ static HRESULT WINAPI fake_di_CreateDevice(
if (SUCCEEDED(result) && !real_did_SetCooperativeLevel)
{
if (rguid && IsEqualGUID(&GUID_SysMouse, rguid))
if (rguid && IsEqualGUID(&GUID_SysMouse, rguid) && g_ddraw)
{
while (real_ShowCursor(FALSE) >= 0);
if (g_ddraw->locked || g_ddraw->devmode)
{
while (real_ShowCursor(FALSE) >= 0);
}
InterlockedExchange(&g_ddraw->show_cursor_count, -1);
}
real_did_SetCooperativeLevel =