Hi,

On 18-03-16 11:53, Olivier Fourdan wrote:
Some games (namely openttd) will raise an XError and fail with a
BadValue if their request to XF86VidModeSetViewPort fails.

Lie to them and pretend it works, so they live happily ever after.

There are probably setting the viewport to 0x0, I remember from my
own xlib game programming, that this was a necessary thing to do back
in the days when xf86vidmode was still a thing / the thing :)

So you may want to check the args of SetViewPort and only return success
on 0x0, if that turns out to be enough it is probably the better
fix and it has the added advantage of not lying to the app.

Dunno about zoom I never used that, what is it supposed to do anyways ?

Chances are it too has a default argument which just means do not do
zoom, you could check for that.

Regards,

Hans




Signed-off-by: Olivier Fourdan <[email protected]>
---
  hw/xwayland/xwayland-vidmode.c | 8 ++++----
  1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/hw/xwayland/xwayland-vidmode.c b/hw/xwayland/xwayland-vidmode.c
index 6d70e39..e440110 100644
--- a/hw/xwayland/xwayland-vidmode.c
+++ b/hw/xwayland/xwayland-vidmode.c
@@ -208,15 +208,15 @@ xwlVidModeDeleteModeline(ScreenPtr pScreen, 
DisplayModePtr mode)
  static Bool
  xwlVidModeZoomViewport(ScreenPtr pScreen, int zoom)
  {
-    /* Unsupported for now */
-    return FALSE;
+    /* Unsupported for now, but pretend it works */
+    return TRUE;
  }

  static Bool
  xwlVidModeSetViewPort(ScreenPtr pScreen, int x, int y)
  {
-    /* Unsupported for now */
-    return FALSE;
+    /* Unsupported for now, but pretend it works */
+    return TRUE;
  }

  static Bool

_______________________________________________
[email protected]: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: https://lists.x.org/mailman/listinfo/xorg-devel

Reply via email to