Module: wine
Branch: master
Commit: 66fc13197b6b8eaabd62effcf36d8c27e71c1c97
URL: http://source.winehq.org/git/wine.git/?a=commit;h=66fc13197b6b8eaabd62effcf…
Author: Ken Thomases <ken(a)codeweavers.com>
Date: Mon Nov 16 22:11:12 2015 -0600
winemac: Use the display unit number rather than display ID for the initial display mode registry key.
On Macs with dual GPUs that automatically switch, the display ID is not stable.
It changes when the active GPU changes. The resulted in the lookup of the
initial display mode failing and games not being able to restore it properly.
The display unit number should be more reliable, although still not perfect.
Signed-off-by: Ken Thomases <ken(a)codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard(a)winehq.org>
---
dlls/winemac.drv/display.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/dlls/winemac.drv/display.c b/dlls/winemac.drv/display.c
index e1357d8..ad01191 100644
--- a/dlls/winemac.drv/display.c
+++ b/dlls/winemac.drv/display.c
@@ -187,7 +187,7 @@ static BOOL write_display_settings(HKEY parent_hkey, CGDirectDisplayID displayID
size_t len;
WCHAR* buf = NULL;
- snprintf(display_key_name, sizeof(display_key_name), "Display 0x%08x", displayID);
+ snprintf(display_key_name, sizeof(display_key_name), "Display 0x%08x", CGDisplayUnitNumber(displayID));
/* @@ Wine registry key: HKLM\Software\Wine\Mac Driver\Initial Display Mode\Display 0xnnnnnnnn */
if (RegCreateKeyExA(parent_hkey, display_key_name, 0, NULL,
REG_OPTION_VOLATILE, KEY_WRITE, NULL, &display_hkey, NULL))
@@ -328,7 +328,7 @@ static struct display_mode_descriptor* create_original_display_mode_descriptor(C
init_original_display_mode();
- snprintf(display_key, sizeof(display_key), display_key_format, displayID);
+ snprintf(display_key, sizeof(display_key), display_key_format, CGDisplayUnitNumber(displayID));
/* @@ Wine registry key: HKLM\Software\Wine\Mac Driver\Initial Display Mode\Display 0xnnnnnnnn */
if (RegOpenKeyExA(HKEY_LOCAL_MACHINE, display_key, 0, KEY_READ, &hkey))
return NULL;
Module: wine
Branch: master
Commit: 1aae516a4942fdbccd9e24e3f89abf0eaa3efa90
URL: http://source.winehq.org/git/wine.git/?a=commit;h=1aae516a4942fdbccd9e24e3f…
Author: Ken Thomases <ken(a)codeweavers.com>
Date: Mon Nov 16 22:10:20 2015 -0600
winemac: Add resource file.
Signed-off-by: Ken Thomases <ken(a)codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard(a)winehq.org>
---
dlls/winemac.drv/Makefile.in | 2 ++
dlls/winemac.drv/winemac.rc | 25 +++++++++++++++++++++++++
2 files changed, 27 insertions(+)
diff --git a/dlls/winemac.drv/Makefile.in b/dlls/winemac.drv/Makefile.in
index b1ee025..c160895 100644
--- a/dlls/winemac.drv/Makefile.in
+++ b/dlls/winemac.drv/Makefile.in
@@ -28,3 +28,5 @@ OBJC_SRCS = \
cocoa_opengl.m \
cocoa_status_item.m \
cocoa_window.m
+
+RC_SRCS = winemac.rc
diff --git a/dlls/winemac.drv/winemac.rc b/dlls/winemac.drv/winemac.rc
new file mode 100644
index 0000000..b563414
--- /dev/null
+++ b/dlls/winemac.drv/winemac.rc
@@ -0,0 +1,25 @@
+/*
+ * Resource file for Mac driver
+ *
+ * Copyright (c) 2007 Alexandre Julliard
+ * Copyright (c) 2013 Ken Thomases for CodeWeavers Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+#define WINE_FILEDESCRIPTION_STR "Wine Mac driver"
+#define WINE_FILENAME_STR "winemac.drv"
+
+#include "wine/wine_common_ver.rc"