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>
(cherry picked from commit 44e1c97ca6
)
This commit is contained in:
parent
fcb89adb4a
commit
082d5ea9a8
|
@ -208,15 +208,26 @@ xwlVidModeDeleteModeline(ScreenPtr pScreen, DisplayModePtr mode)
|
|||
static Bool
|
||||
xwlVidModeZoomViewport(ScreenPtr pScreen, int zoom)
|
||||
{
|
||||
/* Unsupported for now */
|
||||
return FALSE;
|
||||
/* Support only no zoom */
|
||||
return (zoom == 1);
|
||||
}
|
||||
|
||||
static Bool
|
||||
xwlVidModeSetViewPort(ScreenPtr pScreen, int x, int y)
|
||||
{
|
||||
/* Unsupported for now */
|
||||
return FALSE;
|
||||
RROutputPtr output;
|
||||
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
|
||||
|
|
Loading…
Reference in New Issue
Block a user