x11drv: allow xvidmode to init at least for gamma control

Jesse Allen the3dfxdude at gmail.com
Mon Apr 3 20:38:10 CDT 2006


With UseXVidMode = N, it is confusing why the gamma functions fail. This patch 
initializes xvidmode to at least allow the gamma functions to work regardless 
the setting. To use the mode settings, you still need to set UseXVidMode = Y, 
and probably UseXRandR = N.

Changes:
Allow xvidmode to always initialize at least for the gamma functions.


--- wine-current/dlls/x11drv/xvidmode.c	2006-03-27 21:41:21.000000000 -0700
+++ wine/dlls/x11drv/xvidmode.c	2006-04-03 18:15:12.000000000 -0700
@@ -148,8 +148,6 @@ void X11DRV_XF86VM_Init(void)
 
   if (xf86vm_major) return; /* already initialized? */
 
-  if (!usexvidmode) return;
-
   /* see if XVidMode is available */
   wine_tsx11_lock();
   ok = XF86VidModeQueryExtension(gdi_display, &xf86vm_event, &xf86vm_error);
@@ -171,6 +169,12 @@ void X11DRV_XF86VM_Init(void)
       }
 #endif /* X_XF86VidModeSetGammaRamp */
 
+      if (!usexvidmode)
+      {
+          wine_tsx11_unlock();
+          return;
+      }
+
       /* retrieve modes */
       if (root_window == DefaultRootWindow( gdi_display ))
           ok = XF86VidModeGetAllModeLines(gdi_display, DefaultScreen(gdi_display), &nmodes, &real_xf86vm_modes);



More information about the wine-patches mailing list