--- dlls/winex11.drv/xvidmode.c_org 2010-10-15 19:37:09.000000000 +0200 +++ dlls/winex11.drv/xvidmode.c 2010-10-16 09:32:23.396472190 +0200 @@ -60,26 +60,6 @@ static XF86VidModeModeInfo** real_xf86vm_modes; static unsigned int real_xf86vm_mode_count; -#define MAKE_FUNCPTR(f) static typeof(f) * p##f; -MAKE_FUNCPTR(XF86VidModeGetAllModeLines) -MAKE_FUNCPTR(XF86VidModeGetModeLine) -MAKE_FUNCPTR(XF86VidModeLockModeSwitch) -MAKE_FUNCPTR(XF86VidModeQueryExtension) -MAKE_FUNCPTR(XF86VidModeQueryVersion) -MAKE_FUNCPTR(XF86VidModeSetViewPort) -MAKE_FUNCPTR(XF86VidModeSwitchToMode) -#ifdef X_XF86VidModeSetGamma -MAKE_FUNCPTR(XF86VidModeGetGamma) -MAKE_FUNCPTR(XF86VidModeSetGamma) -#endif -#ifdef X_XF86VidModeSetGammaRamp -MAKE_FUNCPTR(XF86VidModeGetGammaRamp) -MAKE_FUNCPTR(XF86VidModeGetGammaRampSize) -MAKE_FUNCPTR(XF86VidModeSetGammaRamp) -#endif -#undef MAKE_FUNCPTR - - static void convert_modeinfo( const XF86VidModeModeInfo *mode) { int rate; @@ -124,7 +104,7 @@ TRACE("Querying XVidMode current mode\n"); wine_tsx11_lock(); - pXF86VidModeGetModeLine(gdi_display, DefaultScreen(gdi_display), &dotclock, &line); + XF86VidModeGetModeLine(gdi_display, DefaultScreen(gdi_display), &dotclock, &line); wine_tsx11_unlock(); convert_modeline(dotclock, &line, &cmode, dwBpp); for (i=0; ihdisplay, real_xf86vm_modes[mode]->vdisplay); - pXF86VidModeSwitchToMode(gdi_display, DefaultScreen(gdi_display), real_xf86vm_modes[mode]); + XF86VidModeSwitchToMode(gdi_display, DefaultScreen(gdi_display), real_xf86vm_modes[mode]); #if 0 /* it is said that SetViewPort causes problems with some X servers */ pXF86VidModeSetViewPort(gdi_display, DefaultScreen(gdi_display), 0, 0); #else @@ -179,34 +159,13 @@ return; } -#define LOAD_FUNCPTR(f) \ - if((p##f = wine_dlsym(xvidmode_handle, #f, NULL, 0)) == NULL) \ - goto sym_not_found; - LOAD_FUNCPTR(XF86VidModeGetAllModeLines) - LOAD_FUNCPTR(XF86VidModeGetModeLine) - LOAD_FUNCPTR(XF86VidModeLockModeSwitch) - LOAD_FUNCPTR(XF86VidModeQueryExtension) - LOAD_FUNCPTR(XF86VidModeQueryVersion) - LOAD_FUNCPTR(XF86VidModeSetViewPort) - LOAD_FUNCPTR(XF86VidModeSwitchToMode) -#ifdef X_XF86VidModeSetGamma - LOAD_FUNCPTR(XF86VidModeGetGamma) - LOAD_FUNCPTR(XF86VidModeSetGamma) -#endif -#ifdef X_XF86VidModeSetGammaRamp - LOAD_FUNCPTR(XF86VidModeGetGammaRamp) - LOAD_FUNCPTR(XF86VidModeGetGammaRampSize) - LOAD_FUNCPTR(XF86VidModeSetGammaRamp) -#endif -#undef LOAD_FUNCPTR - /* see if XVidMode is available */ wine_tsx11_lock(); - ok = pXF86VidModeQueryExtension(gdi_display, &xf86vm_event, &xf86vm_error); + ok = XF86VidModeQueryExtension(gdi_display, &xf86vm_event, &xf86vm_error); if (ok) { X11DRV_expect_error(gdi_display, XVidModeErrorHandler, NULL); - ok = pXF86VidModeQueryVersion(gdi_display, &xf86vm_major, &xf86vm_minor); + ok = XF86VidModeQueryVersion(gdi_display, &xf86vm_major, &xf86vm_minor); if (X11DRV_check_error()) ok = FALSE; } if (ok) @@ -214,7 +173,7 @@ #ifdef X_XF86VidModeSetGammaRamp if (xf86vm_major > 2 || (xf86vm_major == 2 && xf86vm_minor >= 1)) { - pXF86VidModeGetGammaRampSize(gdi_display, DefaultScreen(gdi_display), + XF86VidModeGetGammaRampSize(gdi_display, DefaultScreen(gdi_display), &xf86vm_gammaramp_size); if (xf86vm_gammaramp_size == 256) xf86vm_use_gammaramp = TRUE; @@ -223,7 +182,7 @@ /* retrieve modes */ if (usexvidmode && root_window == DefaultRootWindow( gdi_display )) - ok = pXF86VidModeGetAllModeLines(gdi_display, DefaultScreen(gdi_display), &nmodes, &real_xf86vm_modes); + ok = XF86VidModeGetAllModeLines(gdi_display, DefaultScreen(gdi_display), &nmodes, &real_xf86vm_modes); else ok = FALSE; /* In desktop mode, do not switch resolution... But still use the Gamma ramp stuff */ } @@ -362,7 +321,7 @@ { Bool ret; wine_tsx11_lock(); - ret = pXF86VidModeGetGammaRamp(gdi_display, DefaultScreen(gdi_display), 256, + ret = XF86VidModeGetGammaRamp(gdi_display, DefaultScreen(gdi_display), 256, ramp->red, ramp->green, ramp->blue); wine_tsx11_unlock(); return ret; @@ -371,7 +330,7 @@ else { wine_tsx11_lock(); - ret = pXF86VidModeGetGamma(gdi_display, DefaultScreen(gdi_display), &gamma); + ret = XF86VidModeGetGamma(gdi_display, DefaultScreen(gdi_display), &gamma); wine_tsx11_unlock(); if (ret) { GenerateRampFromGamma(ramp->red, gamma.red); @@ -395,7 +354,7 @@ { Bool ret; wine_tsx11_lock(); - ret = pXF86VidModeSetGammaRamp(gdi_display, DefaultScreen(gdi_display), 256, + ret = XF86VidModeSetGammaRamp(gdi_display, DefaultScreen(gdi_display), 256, ramp->red, ramp->green, ramp->blue); wine_tsx11_unlock(); return ret; @@ -408,7 +367,7 @@ ComputeGammaFromRamp(ramp->blue, &gamma.blue)) { Bool ret; wine_tsx11_lock(); - ret = pXF86VidModeSetGamma(gdi_display, DefaultScreen(gdi_display), &gamma); + ret = XF86VidModeSetGamma(gdi_display, DefaultScreen(gdi_display), &gamma); wine_tsx11_unlock(); return ret; }