Sam Edwards : winex11: Cache XRandR 1.2 display mode.
Alexandre Julliard
julliard at winehq.org
Mon May 13 15:02:44 CDT 2013
Module: wine
Branch: master
Commit: 3a5eef4eed44cb342d3d35d73fe19d2e0109f7ef
URL: http://source.winehq.org/git/wine.git/?a=commit;h=3a5eef4eed44cb342d3d35d73fe19d2e0109f7ef
Author: Sam Edwards <CFSworks at gmail.com>
Date: Fri May 10 10:03:42 2013 -0600
winex11: Cache XRandR 1.2 display mode.
---
dlls/winex11.drv/xrandr.c | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/dlls/winex11.drv/xrandr.c b/dlls/winex11.drv/xrandr.c
index 36b9fe9..fc09020 100644
--- a/dlls/winex11.drv/xrandr.c
+++ b/dlls/winex11.drv/xrandr.c
@@ -278,6 +278,9 @@ static int xrandr12_get_current_mode(void)
XRRCrtcInfo *crtc_info;
int i, ret = -1;
+ if (xrandr_current_mode != -1)
+ return xrandr_current_mode;
+
if (!(resources = pXRRGetScreenResourcesCurrent( gdi_display, root_window )))
{
ERR("Failed to get screen resources.\n");
@@ -310,9 +313,10 @@ static int xrandr12_get_current_mode(void)
if (ret == -1)
{
ERR("Unknown mode, returning default.\n");
- ret = 0;
+ return 0;
}
+ xrandr_current_mode = ret;
return ret;
}
@@ -354,6 +358,7 @@ static LONG xrandr12_set_current_mode( int mode )
return DISP_CHANGE_FAILED;
}
+ xrandr_current_mode = mode;
X11DRV_resize_desktop( dd_modes[mode].width, dd_modes[mode].height );
return DISP_CHANGE_SUCCESSFUL;
}
More information about the wine-cvs
mailing list