Selaa lähdekoodia

Adjust dimensions for rotated monitors

We need to flip the dimensions in the case the monitor is rotated
90° or they won't map correctly to the framebuffer.
tags/v1.8.90
Pierre Ossman 6 vuotta sitten
vanhempi
commit
dc27b95bd2
1 muutettua tiedostoa jossa 10 lisäystä ja 0 poistoa
  1. 10
    0
      unix/xserver/hw/vnc/XorgGlue.c

+ 10
- 0
unix/xserver/hw/vnc/XorgGlue.c Näytä tiedosto

@@ -305,11 +305,21 @@ void vncRandRGetOutputDimensions(int scrIdx, int outputIdx,
{
#ifdef RANDR
rrScrPrivPtr rp = rrGetScrPriv(screenInfo.screens[scrIdx]);
int swap;

*x = rp->outputs[outputIdx]->crtc->x;
*y = rp->outputs[outputIdx]->crtc->y;
*width = rp->outputs[outputIdx]->crtc->mode->mode.width;
*height = rp->outputs[outputIdx]->crtc->mode->mode.height;

switch (rp->outputs[outputIdx]->crtc->rotation & 0xf) {
case RR_Rotate_90:
case RR_Rotate_270:
swap = *width;
*width = *height;
*height = swap;
break;
}
#endif
}


Loading…
Peruuta
Tallenna