Skip to content

Commit d282fc1

Browse files
committed
Set cursor visibility in a loop just in case
1 parent bb93217 commit d282fc1

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/d2dx/RenderContext.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ RenderContext::RenderContext(
8181
!_d2dxContext->GetOptions().GetFlag(OptionsFlag::NoKeepAspectRatio));
8282

8383
#ifndef NDEBUG
84-
ShowCursor_Real(TRUE);
84+
while (ShowCursor_Real(TRUE) < 0) {}
8585
#endif
8686

8787
RECT clientRect;
@@ -781,7 +781,7 @@ static LRESULT CALLBACK d2dxSubclassWndProc(
781781
case WM_NCMOUSEMOVE:
782782
if (CURSOR_HIDDEN)
783783
{
784-
ShowCursor_Real(TRUE);
784+
while (ShowCursor_Real(TRUE) < 0) {}
785785
CURSOR_HIDDEN = false;
786786
}
787787
return 0;
@@ -790,7 +790,7 @@ static LRESULT CALLBACK d2dxSubclassWndProc(
790790
#ifdef NDEBUG
791791
if (!CURSOR_HIDDEN)
792792
{
793-
ShowCursor_Real(FALSE);
793+
while (ShowCursor_Real(FALSE) >= 0) {}
794794
CURSOR_HIDDEN = true;
795795
}
796796
#endif

0 commit comments

Comments
 (0)