static qboolean mouse_avail = true;
-static qboolean mouse_active = false, usingmouse = false;
+static qboolean mouse_active = false, usingmouse = false, ignoremousemove = false;
static float mouse_x, mouse_y;
static int p_mouse_x, p_mouse_y;
mouse_active = true;
mouse_x = mouse_y = 0;
+ ignoremousemove = true;
}
static void uninstall_grabs(void)
XUndefineCursor(vidx11_display, win);
mouse_active = false;
+ ignoremousemove = true;
}
static void HandleEvents(void)
XWarpPointer(vidx11_display, None, win, 0, 0, 0, 0, p_mouse_x, p_mouse_y);
}
+ // if told to ignore one mouse move, do so
+ if (ignoremousemove)
+ {
+ ignoremousemove = false;
+ mouse_x = 0;
+ mouse_y = 0;
+ }
}
static void IN_DeactivateMouse( void )
if (!mouse_active)
{
- mouse_x = mouse_y = 0; // don't spazz
install_grabs();
mouse_active = true;
}
gl_videosyncavailable = GL_CheckExtension("GLX_SGI_video_sync", videosyncfuncs, "-novideosync", false);
usingmouse = false;
+ ignoremousemove = true;
vid_hidden = false;
vid_activewindow = true;
GL_Init();