From 868a4479ba9aeccdd982293b5dc90cdd61cc45c6 Mon Sep 17 00:00:00 2001 From: FunkyFr3sh Date: Sun, 17 Mar 2019 01:42:47 +0100 Subject: [PATCH] fix hidden cursor bug --- src/main.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/main.c b/src/main.c index 0d7060b..976a8df 100644 --- a/src/main.c +++ b/src/main.c @@ -1198,8 +1198,17 @@ LRESULT CALLBACK WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam) HWND hWnd = FindWindowEx(HWND_DESKTOP, NULL, "SDlgDialog", NULL); if (hWnd) { - RECT rc; - if (GetWindowRect(hWnd, &rc) && (rc.bottom - rc.top != 479)) + BOOL hideCursor = TRUE; + + 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); }