I need to know exactly how Wine tells the X server to change gamma settings... so gamma controls in games can work. Basically I need to know.. when a game has like a gamma adjust bar, and it moves... what specifically happens behind the scenes. I need to know this because right now Xquartz on Mac OS X does not support doing this at all, and I'd like to be able to add that ability into it... but I do not know how it works.
On 10/16/10 8:12 PM, doh123 wrote:> I need to know exactly how Wine tells the X server to change gamma settings... so gamma controls in games can work. Basically I need to know.. when a game has like a gamma adjust bar, and it moves... what specifically happens behind the scenes.The game calls SetDeviceGammaRamp(), or something that ultimately calls SetDeviceGammaRamp(). SetDeviceGammaRamp() has a driver entry-point that GDI calls. The x11drv implementation uses the XFree86 VidMode extension to set the gamma--this requires version 2 or better of the xf86vm extension.> > I need to know this because right now Xquartz on Mac OS X does not support doing this at all,This is because it doesn't support the xf86vm extension.> and I'd like to be able to add that ability into it... but I do not know how it works.This is the extension you need to implement. Luckily, it's similar to other such interfaces, such as Quartz Display Services in Mac OS X or the GDI functions. Take a look at the headers "xf86vm.h", "xf86vmode.h", and "xf86vmproto.h", all in <X11/extensions>. Chip
doh123 wrote:> I need to know exactly how Wine tells the X server to change gamma settings...Via XVidMode X11 extension (XF86VidModeSetGamma, XF86VidModeSetGammaRamp functions).
vitamin wrote:> > doh123 wrote: > > I need to know exactly how Wine tells the X server to change gamma settings... > > Via XVidMode X11 extension (XF86VidModeSetGamma, XF86VidModeSetGammaRamp functions).thanks! Someday X11 on OSX will be able to run Wine great, instead of just good :-)
is there any plans to add to Wine to adjust gamma by using RandR 1.3 for gamma control in the future? RandR support is being added to Xquartz, and can possibly add gamma control in eventually through that... I was going to try to write a patch to add it in... but there is no XVidMode extension at all in Xquartz, so that would be a lot of work.