Commit ff6b771e authored by Jon Turney's avatar Jon Turney

hw/xwin: Improve data returned for RANDR queries

Set a linear gamma ramp.  This avoids the xrandr command always warning
'Failed to get size of gamma for output default'
(perhaps we should be using GDI GetDeviceGammaRamp(), if possible?)

Make CRTC report non-zero physical dimensions initially
parent 2549ab20
......@@ -276,6 +276,21 @@ winRandRInit(ScreenPtr pScreen)
/* Set mode to current display size */
winRandRUpdateMode(pScreen, output);
/* Make up some physical dimensions */
output->mmWidth = (pScreen->width * 25.4)/monitorResolution;
output->mmHeight = (pScreen->height * 25.4)/monitorResolution;
/* Allocate and make up a (fixed, linear) gamma ramp */
{
int i;
RRCrtcGammaSetSize(crtc, 256);
for (i = 0; i < crtc->gammaSize; i++) {
crtc->gammaRed[i] = i << 8;
crtc->gammaBlue[i] = i << 8;
crtc->gammaGreen[i] = i << 8;
}
}
}
/*
......
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