xwayland: Pretend we support viewport in vidmode
Some games (namely openttd) will raise an XError and fail with a BadValue if their request to XF86VidModeSetViewPort fails. Support only the default zoom and viewport, fail for everything else. Signed-off-by: Olivier Fourdan <ofourdan@redhat.com> Reviewed-by: Hans de Goede <hdegoede@redhat.com>
This commit is contained in:
parent
6e3a6e30a6
commit
44e1c97ca6
|
@ -208,15 +208,26 @@ xwlVidModeDeleteModeline(ScreenPtr pScreen, DisplayModePtr mode)
|
||||||
static Bool
|
static Bool
|
||||||
xwlVidModeZoomViewport(ScreenPtr pScreen, int zoom)
|
xwlVidModeZoomViewport(ScreenPtr pScreen, int zoom)
|
||||||
{
|
{
|
||||||
/* Unsupported for now */
|
/* Support only no zoom */
|
||||||
return FALSE;
|
return (zoom == 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
static Bool
|
static Bool
|
||||||
xwlVidModeSetViewPort(ScreenPtr pScreen, int x, int y)
|
xwlVidModeSetViewPort(ScreenPtr pScreen, int x, int y)
|
||||||
{
|
{
|
||||||
/* Unsupported for now */
|
RROutputPtr output;
|
||||||
return FALSE;
|
RRCrtcPtr crtc;
|
||||||
|
|
||||||
|
output = RRFirstOutput(pScreen);
|
||||||
|
if (output == NULL)
|
||||||
|
return FALSE;
|
||||||
|
|
||||||
|
crtc = output->crtc;
|
||||||
|
if (crtc == NULL)
|
||||||
|
return FALSE;
|
||||||
|
|
||||||
|
/* Support only default viewport */
|
||||||
|
return (x == crtc->x && y == crtc->y);
|
||||||
}
|
}
|
||||||
|
|
||||||
static Bool
|
static Bool
|
||||||
|
|
Loading…
Reference in New Issue