aboutsummaryrefslogtreecommitdiffstats
path: root/code/unix/linux_glimp.c
diff options
context:
space:
mode:
authortma <tma@edf5b092-35ff-0310-97b2-ce42778d08ea>2005-11-06 17:31:48 +0000
committertma <tma@edf5b092-35ff-0310-97b2-ce42778d08ea>2005-11-06 17:31:48 +0000
commited460fe3673ae043ad58d9afd76b989e73935236 (patch)
tree764333babd6e2627d99d9956803e5fa38ad49408 /code/unix/linux_glimp.c
parenta2ef6b164a7f3dc518b49c284c7c18a898758ba4 (diff)
downloadioquake3-aero-ed460fe3673ae043ad58d9afd76b989e73935236.tar.gz
ioquake3-aero-ed460fe3673ae043ad58d9afd76b989e73935236.zip
* Ignore in_dgamouse setting if dga isn't available
* Changed status of Solaris sparc git-svn-id: svn://svn.icculus.org/quake3/trunk@300 edf5b092-35ff-0310-97b2-ce42778d08ea
Diffstat (limited to 'code/unix/linux_glimp.c')
-rw-r--r--code/unix/linux_glimp.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/code/unix/linux_glimp.c b/code/unix/linux_glimp.c
index e501033..3c35c74 100644
--- a/code/unix/linux_glimp.c
+++ b/code/unix/linux_glimp.c
@@ -410,9 +410,9 @@ static void install_grabs(void)
mouseResetTime = Sys_Milliseconds ();
+#ifdef HAVE_XF86DGA
if (in_dgamouse->value)
{
-#ifdef HAVE_XF86DGA
int MajorVersion, MinorVersion;
if (!XF86DGAQueryVersion(dpy, &MajorVersion, &MinorVersion))
@@ -425,8 +425,8 @@ static void install_grabs(void)
XF86DGADirectVideo(dpy, DefaultScreen(dpy), XF86DGADirectMouse);
XWarpPointer(dpy, None, win, 0, 0, 0, 0, 0, 0);
}
-#endif /* HAVE_XF86DGA */
} else
+#endif /* HAVE_XF86DGA */
{
mwx = glConfig.vidWidth / 2;
mwy = glConfig.vidHeight / 2;
@@ -443,14 +443,14 @@ static void install_grabs(void)
static void uninstall_grabs(void)
{
+#ifdef HAVE_XF86DGA
if (in_dgamouse->value)
{
if (com_developer->value)
ri.Printf( PRINT_ALL, "DGA Mouse - Disabling DGA DirectVideo\n" );
-#ifdef HAVE_XF86DGA
XF86DGADirectVideo(dpy, DefaultScreen(dpy), 0);
-#endif /* HAVE_XF86DGA */
}
+#endif /* HAVE_XF86DGA */
XChangePointerControl(dpy, qtrue, qtrue, mouse_accel_numerator,
mouse_accel_denominator, mouse_threshold);
@@ -589,6 +589,7 @@ static void HandleEvents(void)
t = Sys_XTimeToSysTime(event.xkey.time);
if (mouse_active)
{
+#ifdef HAVE_XF86DGA
if (in_dgamouse->value)
{
mx += event.xmotion.x_root;
@@ -599,6 +600,7 @@ static void HandleEvents(void)
}
mx = my = 0;
} else
+#endif /* HAVE_XF86DGA */
{
// If it's a center motion, we've just returned from our warp
if (event.xmotion.x == glConfig.vidWidth/2 &&
@@ -952,7 +954,7 @@ int GLW_SetMode( const char *drivername, int mode, qboolean fullscreen )
{
if (!XF86DGAQueryVersion(dpy, &dga_MajorVersion, &dga_MinorVersion))
{
- // unable to query, probalby not supported
+ // unable to query, probably not supported
ri.Printf( PRINT_ALL, "Failed to detect XF86DGA Mouse\n" );
ri.Cvar_Set( "in_dgamouse", "0" );
} else
@@ -961,7 +963,7 @@ int GLW_SetMode( const char *drivername, int mode, qboolean fullscreen )
dga_MajorVersion, dga_MinorVersion);
}
}
-#endif /* HAVE_XF86DGA */
+#endif /* HAVE_XF86DGA */
#ifdef HAVE_XF86DGA
if (vidmode_ext)