mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2025-12-24 14:50:05 +01:00
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
1 changed files with 15 additions and 0 deletions
|
|
@ -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…
Add table
Reference in a new issue