View | Details | Raw Unified | Return to bug 130936
Collapse All | Expand All

(-)tyrquake/Makefile (-1 lines)
Lines 15-21 Link Here
15
15
16
USE_GL=		yes
16
USE_GL=		yes
17
USE_GMAKE=	yes
17
USE_GMAKE=	yes
18
USE_XORG=	xxf86dga
19
MAKE_ENV=	QBASEDIR="${Q1DIR}"
18
MAKE_ENV=	QBASEDIR="${Q1DIR}"
20
19
21
OPTIONS=	OPTIMIZED_CFLAGS "Enable compilation optimizations" on \
20
OPTIONS=	OPTIMIZED_CFLAGS "Enable compilation optimizations" on \
(-)tyrquake/files/patch-common::gl_vidlinuxglx.c (+20 lines)
Line 0 Link Here
1
--- common/gl_vidlinuxglx.c.orig	2009-01-24 11:35:16.000000000 +0100
2
+++ common/gl_vidlinuxglx.c	2009-01-24 11:35:26.000000000 +0100
3
@@ -387,16 +387,12 @@
4
 
5
 	case MotionNotify:
6
 	    if (mouse_grab_active) {
7
-		if (dga_mouse_active) {
8
-		    mouse_x += event.xmotion.x_root;
9
-		    mouse_y += event.xmotion.y_root;
10
-		} else {
11
 		    mouse_x = event.xmotion.x - (int)(vid.width / 2);
12
 		    mouse_y = event.xmotion.y - (int)(vid.height / 2);
13
 
14
 		    if (mouse_x || mouse_y)
15
 			dowarp = true;
16
-		}
17
+
18
 	    }
19
 	    break;
20
 
(-)tyrquake/files/patch-common::in_x11.c (+116 lines)
Line 0 Link Here
1
--- common/in_x11.c.orig	2009-01-24 11:18:46.000000000 +0100
2
+++ common/in_x11.c	2009-01-24 11:27:30.000000000 +0100
3
@@ -25,15 +25,11 @@
4
 #include "vid.h"
5
 #include "sys.h"
6
 
7
-#include <X11/extensions/xf86dga.h>
8
-
9
 // FIXME - make static when possible
10
 qboolean mouse_available = false;	// Mouse available for use
11
 
12
 static qboolean keyboard_grab_active = false;
13
 qboolean mouse_grab_active = false;
14
-static qboolean dga_available = false;
15
-qboolean dga_mouse_active = false;
16
 
17
 int mouse_x, mouse_y;
18
 
19
@@ -58,41 +54,7 @@
20
 }
21
 
22
 
23
-static void
24
-IN_ActivateDGAMouse(void)
25
-{
26
-    if (dga_available && !dga_mouse_active) {
27
-	XF86DGADirectVideo(x_disp, DefaultScreen(x_disp), XF86DGADirectMouse);
28
-	dga_mouse_active = true;
29
-    }
30
-}
31
-
32
-static void
33
-IN_DeactivateDGAMouse(void)
34
-{
35
-    if (dga_available && dga_mouse_active) {
36
-	XF86DGADirectVideo(x_disp, DefaultScreen(x_disp), 0);
37
-	dga_mouse_active = false;
38
-	IN_CenterMouse();	// maybe set mouse_x = 0 and mouse_y = 0?
39
-    }
40
-}
41
-
42
-static void
43
-in_dgamouse_f(struct cvar_s *var)
44
-{
45
-    if (var->value) {
46
-	Con_DPrintf("Callback: in_dgamouse ON\n");
47
-	IN_ActivateDGAMouse();
48
-    } else {
49
-	Con_DPrintf("Callback: in_dgamouse OFF\n");
50
-	IN_DeactivateDGAMouse();
51
-    }
52
-}
53
-
54
 cvar_t in_mouse = { "in_mouse", "1", false };
55
-cvar_t in_dgamouse = { "in_dgamouse", "1", false, false, 0,
56
-    in_dgamouse_f
57
-};
58
 cvar_t _windowed_mouse = { "_windowed_mouse", "0", true, false, 0,
59
     windowed_mouse_f
60
 };
61
@@ -154,13 +116,6 @@
62
 	}
63
 	mouse_grab_active = true;
64
 
65
-	// FIXME - need those cvar callbacks to fix changed values...
66
-	if (dga_available) {
67
-	    if (in_dgamouse.value)
68
-		IN_ActivateDGAMouse();
69
-	} else {
70
-	    in_dgamouse.value = 0;
71
-	}
72
     } else {
73
 	Sys_Error("Bad grab?");
74
     }
75
@@ -174,10 +129,6 @@
76
 	XUndefineCursor(x_disp, x_win);
77
 	mouse_grab_active = false;
78
     }
79
-
80
-    if (dga_mouse_active) {
81
-	IN_DeactivateDGAMouse();
82
-    }
83
 }
84
 
85
 void
86
@@ -208,7 +159,6 @@
87
 IN_InitCvars(void)
88
 {
89
     Cvar_RegisterVariable(&in_mouse);
90
-    Cvar_RegisterVariable(&in_dgamouse);
91
     Cvar_RegisterVariable(&m_filter);
92
     Cvar_RegisterVariable(&_windowed_mouse);
93
 }
94
@@ -220,7 +170,6 @@
95
 
96
     keyboard_grab_active = false;
97
     mouse_grab_active = false;
98
-    dga_mouse_active = false;
99
 
100
     // FIXME - do proper detection?
101
     //       - Also, look at other vid_*.c files for clues
102
@@ -229,14 +178,6 @@
103
     if (x_disp == NULL)
104
 	Sys_Error("x_disp not initialised before input...");
105
 
106
-    if (!XF86DGAQueryVersion(x_disp, &MajorVersion, &MinorVersion)) {
107
-	Con_Printf("Failed to detect XF86DGA Mouse\n");
108
-	in_dgamouse.value = 0;
109
-	dga_available = false;
110
-    } else {
111
-	dga_available = true;
112
-    }
113
-
114
     // Need to grab the input focus at startup, just in case...
115
     // FIXME - must be viewable or get BadMatch
116
     XSetInputFocus(x_disp, x_win, RevertToParent, CurrentTime);
(-)tyrquake/files/patch-common::vid_x.c (+19 lines)
Line 0 Link Here
1
--- common/vid_x.c.orig	2009-01-24 11:30:23.000000000 +0100
2
+++ common/vid_x.c	2009-01-24 11:32:14.000000000 +0100
3
@@ -1059,16 +1059,11 @@
4
 
5
 	case MotionNotify:
6
 	    if (mouse_grab_active) {
7
-		if (dga_mouse_active) {
8
-		    mouse_x += x_event.xmotion.x_root;
9
-		    mouse_y += x_event.xmotion.y_root;
10
-		} else {
11
 		    mouse_x = x_event.xmotion.x - (int)(vid.width / 2);
12
 		    mouse_y = x_event.xmotion.y - (int)(vid.height / 2);
13
 
14
 		    if (mouse_x || mouse_y)
15
 			dowarp = true;
16
-		}
17
 	    }
18
 	    break;
19
 

Return to bug 130936