From 046f4e4e2de217f41b90af24f2562e0ff0aed5a7 Mon Sep 17 00:00:00 2001 From: Bruno Gonzalez Date: Wed, 19 Nov 2014 19:55:11 +0100 Subject: [PATCH] Fix off-by-one error in cursor hiding/showing function Incorrect API use according to msdn. Source: http://msdn.microsoft.com/en-us/library/windows/desktop/ms648396%28v=vs.85%29.aspx "cursor is displayed only if the display count is greater than or equal to 0" --- Engine/source/windowManager/win32/win32CursorController.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Engine/source/windowManager/win32/win32CursorController.cpp b/Engine/source/windowManager/win32/win32CursorController.cpp index 28a379682..9b1b1eb3f 100644 --- a/Engine/source/windowManager/win32/win32CursorController.cpp +++ b/Engine/source/windowManager/win32/win32CursorController.cpp @@ -106,7 +106,7 @@ void Win32CursorController::setCursorVisible( bool visible ) if( visible ) ShowCursor( true ); else - while( ShowCursor(false) > 0 ); + while( ShowCursor(false) >= 0 ); } bool Win32CursorController::isCursorVisible()