1
0
mirror of https://github.com/FunkyFr3sh/cnc-ddraw.git synced 2025-03-24 17:49:52 +01:00

fix hidden cursor bug

This commit is contained in:
FunkyFr3sh 2019-03-17 01:42:47 +01:00
parent 4506b00863
commit 868a4479ba

View File

@ -1198,8 +1198,17 @@ LRESULT CALLBACK WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
HWND hWnd = FindWindowEx(HWND_DESKTOP, NULL, "SDlgDialog", NULL); HWND hWnd = FindWindowEx(HWND_DESKTOP, NULL, "SDlgDialog", NULL);
if (hWnd) if (hWnd)
{ {
RECT rc; BOOL hideCursor = TRUE;
if (GetWindowRect(hWnd, &rc) && (rc.bottom - rc.top != 479))
do
{
RECT rc;
if (GetWindowRect(hWnd, &rc) && rc.bottom - rc.top == 479)
hideCursor = FALSE;
} while ((hWnd = FindWindowEx(HWND_DESKTOP, hWnd, "SDlgDialog", NULL)));
if (hideCursor)
while (ShowCursor(FALSE) > 0); while (ShowCursor(FALSE) > 0);
} }