Re: Patches to fix fullscreen games viewport issues with recent Xorg versions
Op Fri, 13 Nov 2009 11:10:26 +0100
schreef Hans de Goede <hdegoede@redhat.com>:
> > I really feel the X server should be fixed instead. This
> > functionality is definitely in use in the wild.
>
> I won't disagree, but I don't have the skills, and those who do have
> the skills (the driver authors), I don't think will give this high
> priority, but I may be wrong. So go and file bugs and please but me
> in the CC.
Can you try this xserver patch? It seems to work for me (xserver 1.7.0,
radeon, intel, vesa drivers) but I don't have much hardware to test on.
diff --git a/hw/xfree86/common/xf86VidMode.c b/hw/xfree86/common/xf86VidMode.c
index 49b86e7..9b357ae 100644
--- a/hw/xfree86/common/xf86VidMode.c
+++ b/hw/xfree86/common/xf86VidMode.c
@@ -42,6 +42,7 @@
#include "os.h"
#include "xf86.h"
#include "xf86Priv.h"
+#include "xf86Crtc.h"
#ifdef XF86VIDMODE
#include "vidmodeproc.h"
@@ -298,8 +299,14 @@ VidModeSetViewPort(int scrnIndex, int x, int y)
pScrn->frameY0 = min( max(y, 0),
pScrn->virtualY - pScrn->currentMode->VDisplay );
pScrn->frameY1 = pScrn->frameY0 + pScrn->currentMode->VDisplay - 1;
- if (pScrn->AdjustFrame != NULL)
+
+ if (xf86CrtcConfigPrivateIndex != -1) {
+ xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(pScrn);
+ xf86CrtcPtr crtc = config->output[config->compat_output]->crtc;
+ xf86CrtcSetOrigin(crtc, pScrn->frameX0, pScrn->frameY0);
+ } else if (pScrn->AdjustFrame != NULL) {
(pScrn->AdjustFrame)(scrnIndex, pScrn->frameX0, pScrn->frameY0, 0);
+ }
return TRUE;
}
Reply to: