- Hide the cursor by overriding WM_SETCURSOR, as seen in the IDirect3DDEvice9::ShowCursor()
example. Do not modify the window class pointer. I still had an instance where I was left with an invisible pointer no matter where I moved it, so hopefully this takes care of that. (edit: it doesn't.) SVN r2496 (trunk)
This commit is contained in:
parent
d32d8b4f9f
commit
6000217889
3 changed files with 20 additions and 8 deletions
|
|
@ -147,6 +147,7 @@ EXTERN_CVAR (Bool, lookstrafe)
|
|||
EXTERN_CVAR (Bool, use_joystick)
|
||||
|
||||
static int WheelDelta;
|
||||
extern bool CursorState;
|
||||
|
||||
extern BOOL paused;
|
||||
static bool noidle = false;
|
||||
|
|
@ -418,6 +419,14 @@ LRESULT CALLBACK WndProc (HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
|
|||
I_CheckNativeMouse (false);
|
||||
break;
|
||||
|
||||
case WM_SETCURSOR:
|
||||
if (!CursorState)
|
||||
{
|
||||
SetCursor(NULL); // turn off window cursor
|
||||
return TRUE; // Prevent Windows from setting cursor to window class cursor
|
||||
}
|
||||
break;
|
||||
|
||||
case WM_SIZE:
|
||||
InvalidateRect (Window, NULL, FALSE);
|
||||
break;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue