Commit 0fe854b7 authored by Francois Gouget's avatar Francois Gouget Committed by Alexandre Julliard

Added an option to disable XVidMode support.

parent 38909c59
......@@ -55,7 +55,7 @@ unsigned int screen_width;
unsigned int screen_height;
unsigned int screen_depth;
Window root_window;
int dxgrab, usedga;
int dxgrab, usedga, usexvidmode;
unsigned int X11DRV_server_startticks;
......@@ -219,6 +219,9 @@ static void setup_options(void)
if (!get_config_key( hkey, appkey, "UseDGA", buffer, sizeof(buffer) ))
usedga = IS_OPTION_TRUE( buffer[0] );
if (!get_config_key( hkey, appkey, "UseXVidMode", buffer, sizeof(buffer) ))
usexvidmode = IS_OPTION_TRUE( buffer[0] );
screen_depth = 0;
if (!get_config_key( hkey, appkey, "ScreenDepth", buffer, sizeof(buffer) ))
screen_depth = atoi(buffer);
......
......@@ -24,6 +24,8 @@ DEFAULT_DEBUG_CHANNEL(x11drv);
#ifdef HAVE_LIBXXF86VM
extern int usexvidmode;
static int xf86vm_event, xf86vm_error, xf86vm_major, xf86vm_minor;
LPDDHALMODEINFO xf86vm_modes;
......@@ -62,13 +64,15 @@ void X11DRV_XF86VM_Init(void)
if (xf86vm_major) return; /* already initialized? */
/* if in desktop mode, don't use XVidMode */
if (root_window != DefaultRootWindow(gdi_display)) return;
if (!usexvidmode) return;
/* see if XVidMode is available */
if (!TSXF86VidModeQueryExtension(gdi_display, &xf86vm_event, &xf86vm_error)) return;
if (!TSXF86VidModeQueryVersion(gdi_display, &xf86vm_major, &xf86vm_minor)) return;
/* if in desktop mode, don't use XVidMode */
if (root_window != DefaultRootWindow(gdi_display)) return;
/* retrieve modes */
if (!TSXF86VidModeGetAllModeLines(gdi_display, DefaultScreen(gdi_display), &nmodes,
&modes))
......
......@@ -124,6 +124,8 @@ WINE REGISTRY Version 2
"UseDGA" = "Y"
; Use XShm extension if present
"UseXShm" = "Y"
; Use XVidMode extension if present
"UseXVidMode" = "Y"
; Enable DirectX mouse grab
"DXGrab" = "N"
; Create the desktop window with a double-buffered visual
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment