mirror of
https://github.com/FunkyFr3sh/cnc-ddraw.git
synced 2025-03-15 06:04:49 +01:00
fix for HOMM4 cursor issues
This commit is contained in:
parent
6101e34ddd
commit
dfe15ec8b0
4
src/dd.c
4
src/dd.c
@ -922,7 +922,9 @@ HRESULT dd_SetCooperativeLevel(HWND hwnd, DWORD dwFlags)
|
||||
if (!g_ddraw->devmode)
|
||||
{
|
||||
HCURSOR cursor = real_SetCursor(LoadCursor(NULL, IDC_ARROW));
|
||||
InterlockedExchange((LONG*)&g_ddraw->old_cursor, (LONG)cursor);
|
||||
|
||||
if (cursor != LoadCursor(NULL, IDC_WAIT))
|
||||
InterlockedExchange((LONG*)&g_ddraw->old_cursor, (LONG)cursor);
|
||||
}
|
||||
|
||||
int cursor_count = real_ShowCursor(TRUE) - 1;
|
||||
|
@ -61,6 +61,7 @@ void mouse_unlock()
|
||||
g_mouse_locked = FALSE;
|
||||
|
||||
real_ClipCursor(NULL);
|
||||
//ReleaseCapture();
|
||||
|
||||
RECT rc = { 0 };
|
||||
real_GetClientRect(g_ddraw->hwnd, &rc);
|
||||
@ -74,6 +75,8 @@ void mouse_unlock()
|
||||
(int)(rc.left + (cur_x * g_ddraw->render.scale_w)),
|
||||
(int)(rc.top + (cur_y * g_ddraw->render.scale_h)));
|
||||
|
||||
real_SetCursor(LoadCursor(NULL, IDC_ARROW));
|
||||
|
||||
while (real_ShowCursor(TRUE) < 0);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user