#include <X11/cursorfont.h>
#include <X11/extensions/XShm.h>
+#ifndef __APPLE__
#include <X11/extensions/xf86dga.h>
+#endif
#include <X11/extensions/xf86vmode.h>
#include "quakedef.h"
static float mouse_x, mouse_y;
static int p_mouse_x, p_mouse_y;
+#ifndef __APPLE__
cvar_t vid_dga = {CVAR_SAVE, "vid_dga", "1"};
cvar_t vid_dga_mouseaccel = {0, "vid_dga_mouseaccel", "1"};
+#endif
qboolean vidmode_ext = false;
XGrabPointer(vidx11_display, win, True, 0, GrabModeAsync, GrabModeAsync, win, None, CurrentTime);
+#ifndef __APPLE__
if (vid_dga.integer)
{
int MajorVersion, MinorVersion;
}
}
else
+#endif
XWarpPointer(vidx11_display, None, win, 0, 0, 0, 0, scr_width / 2, scr_height / 2);
XGrabKeyboard(vidx11_display, win, False, GrabModeAsync, GrabModeAsync, CurrentTime);
if (!vidx11_display || !win)
return;
+#ifndef __APPLE__
if (vid_dga.integer == 1)
XF86DGADirectVideo(vidx11_display, DefaultScreen(vidx11_display), 0);
+#endif
XUngrabPointer(vidx11_display, CurrentTime);
XUngrabKeyboard(vidx11_display, CurrentTime);
// mouse moved
if (usingmouse)
{
+#ifndef __APPLE__
if (vid_dga.integer == 1)
{
mouse_x += event.xmotion.x_root * vid_dga_mouseaccel.value;
mouse_y += event.xmotion.y_root * vid_dga_mouseaccel.value;
}
else
+#endif
{
if (!event.xmotion.send_event)
void VID_Init(void)
{
+#ifndef __APPLE__
Cvar_RegisterVariable (&vid_dga);
Cvar_RegisterVariable (&vid_dga_mouseaccel);
+#endif
InitSig(); // trap evil signals
if (COM_CheckParm ("-nomouse") || COM_CheckParm("-safe"))
mouse_avail = false;