diff options
author | Alex Deucher <alexdeucher@gmail.com> | 2011-01-27 13:09:26 -0500 |
---|---|---|
committer | Alex Deucher <alexdeucher@gmail.com> | 2011-01-27 13:09:26 -0500 |
commit | 3dc28c86eb57cac819e4ed650acfe1f7df6ef565 (patch) | |
tree | 39d40847285f35d126c2d4d05c4ed164808b2ca1 /src/radeon_output.c | |
parent | f58e1354b78bf6b70120bddfe1566da3b0723f72 (diff) |
ums: fix build against xserver >= 1.10
xf86CrtcSetMode was removed in:
http://cgit.freedesktop.org/xorg/xserver/commit/?id=8b35118c03590a7ad3786d3284bafb3f40fcb8cc
Diffstat (limited to 'src/radeon_output.c')
-rw-r--r-- | src/radeon_output.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/radeon_output.c b/src/radeon_output.c index 689a5924..83aa7c32 100644 --- a/src/radeon_output.c +++ b/src/radeon_output.c @@ -1618,8 +1618,23 @@ radeon_set_mode_for_property(xf86OutputPtr output) xf86CrtcPtr crtc = output->crtc; if (crtc->enabled) { +#if XORG_VERSION_CURRENT >= XORG_VERSION_NUMERIC(1,9,99,1,0) + xf86CrtcSetRec crtc_set_rec; + + crtc_set_rec.flags = (XF86CrtcSetMode | + XF86CrtcSetOutput | + XF86CrtcSetOrigin | + XF86CrtcSetRotation); + crtc_set_rec.mode = &crtc->desiredMode; + crtc_set_rec.rotation = crtc->desiredRotation; + crtc_set_rec.transform = NULL; + crtc_set_rec.x = crtc->desiredX; + crtc_set_rec.y = crtc->desiredY; + if (!xf86CrtcSet(crtc, &crtc_set_rec)) { +#else if (!xf86CrtcSetMode(crtc, &crtc->desiredMode, crtc->desiredRotation, crtc->desiredX, crtc->desiredY)) { +#endif xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "Failed to set mode after propery change!\n"); return FALSE; |