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
This commit is contained in:
parent
2549ab2065
commit
ff6b771eee
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
Loading…
Reference in New Issue