- Removed HaveFocus variable in preference of using GetForegroundWindow().

SVN r1616 (trunk)
This commit is contained in:
Randy Heit 2009-05-27 21:11:06 +00:00
commit a925f7eab6
4 changed files with 2 additions and 7 deletions

View file

@ -113,7 +113,6 @@ extern HWND Window;
extern LPDIRECTINPUT8 g_pdi;
extern LPDIRECTINPUT g_pdi3;
extern bool GUICapture;
extern bool HaveFocus;
// PRIVATE DATA DEFINITIONS ------------------------------------------------
@ -180,7 +179,7 @@ static void SetCursorState(bool visible)
{
HCURSOR usingCursor = visible ? TheArrowCursor : TheInvisibleCursor;
SetClassLongPtr(Window, GCLP_HCURSOR, (LONG_PTR)usingCursor);
if (HaveFocus)
if (GetForegroundWindow() == Window)
{
SetCursor(usingCursor);
}
@ -1177,6 +1176,5 @@ void I_StartupMouse ()
MouseMode = new_mousemode;
NativeMouse = true;
}
HaveFocus = (GetFocus() == Window);
}