Module: wine
Branch: master
Commit: a8df2c61d8d4541b7b55f50d86b59a12da2d1768
URL: https://source.winehq.org/git/wine.git/?a=commit;h=a8df2c61d8d4541b7b55f50d…
Author: Alex Henrie <alexhenrie24(a)gmail.com>
Date: Sun Jul 15 23:28:40 2018 -0600
winevulkan: Correct spelling of "of" in a comment.
Signed-off-by: Alex Henrie <alexhenrie24(a)gmail.com>
Signed-off-by: Alexandre Julliard <julliard(a)winehq.org>
---
dlls/winevulkan/vulkan.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/winevulkan/vulkan.c b/dlls/winevulkan/vulkan.c
index a06cfa1..34ef457 100644
--- a/dlls/winevulkan/vulkan.c
+++ b/dlls/winevulkan/vulkan.c
@@ -30,7 +30,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(vulkan);
/* For now default to 4 as it felt like a reasonable version feature wise to support.
* Don't support the optional vk_icdGetPhysicalDeviceProcAddr introduced in this version
* as it is unlikely we will implement physical device extensions, which the loader is not
- * aware off. Version 5 adds more extensive version checks. Something to tackle later.
+ * aware of. Version 5 adds more extensive version checks. Something to tackle later.
*/
#define WINE_VULKAN_ICD_VERSION 4
Module: wine
Branch: master
Commit: 250944b64304ee85d92955d2a901268ab08b720e
URL: https://source.winehq.org/git/wine.git/?a=commit;h=250944b64304ee85d92955d2…
Author: Ken Thomases <ken(a)codeweavers.com>
Date: Sun Jul 15 22:54:15 2018 -0500
winemac: Disable macOS's App Nap energy-saving feature by default for Wine GUI processes.
App Nap defers timer firings and I/O if the app is not visibly or audibly
updating. An app is supposed to disable it during user-requested or background
activity, but we can't know when the Windows app is engaged in such. Since it's
not generally acceptable for timers or IO to be deferred, we have to disable it
at all times.
The user can re-enable it by setting the following registry setting:
[HKEY\Software\Wine\Mac Driver]
"EnableAppNap"="y"
Signed-off-by: Ken Thomases <ken(a)codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard(a)winehq.org>
---
dlls/winemac.drv/cocoa_app.m | 7 +++++++
dlls/winemac.drv/macdrv_cocoa.h | 1 +
dlls/winemac.drv/macdrv_main.c | 4 ++++
3 files changed, 12 insertions(+)
diff --git a/dlls/winemac.drv/cocoa_app.m b/dlls/winemac.drv/cocoa_app.m
index 239c11f..efbd657 100644
--- a/dlls/winemac.drv/cocoa_app.m
+++ b/dlls/winemac.drv/cocoa_app.m
@@ -235,6 +235,13 @@ static NSString* WineLocalizedString(unsigned int stringID)
[NSApp setActivationPolicy:NSApplicationActivationPolicyRegular];
[NSApp activateIgnoringOtherApps:YES];
+#if defined(MAC_OS_X_VERSION_10_9) && MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_9
+ if (!enable_app_nap && [NSProcessInfo instancesRespondToSelector:@selector(beginActivityWithOptions:reason:)])
+ {
+ [[[NSProcessInfo processInfo] beginActivityWithOptions:NSActivityUserInitiatedAllowingIdleSystemSleep
+ reason:@"Running Windows program"] retain]; // intentional leak
+ }
+#endif
mainMenu = [[[NSMenu alloc] init] autorelease];
diff --git a/dlls/winemac.drv/macdrv_cocoa.h b/dlls/winemac.drv/macdrv_cocoa.h
index acab5df..6bad790 100644
--- a/dlls/winemac.drv/macdrv_cocoa.h
+++ b/dlls/winemac.drv/macdrv_cocoa.h
@@ -166,6 +166,7 @@ extern int gl_surface_mode DECLSPEC_HIDDEN;
extern CFDictionaryRef localized_strings DECLSPEC_HIDDEN;
extern int retina_enabled DECLSPEC_HIDDEN; /* Whether Retina mode is enabled via registry setting. */
extern int retina_on DECLSPEC_HIDDEN; /* Whether Retina mode is currently active (enabled and display is in default mode). */
+extern int enable_app_nap DECLSPEC_HIDDEN;
static inline CGRect cgrect_mac_from_win(CGRect rect)
{
diff --git a/dlls/winemac.drv/macdrv_main.c b/dlls/winemac.drv/macdrv_main.c
index 491ab06..4bd7411 100644
--- a/dlls/winemac.drv/macdrv_main.c
+++ b/dlls/winemac.drv/macdrv_main.c
@@ -60,6 +60,7 @@ int use_precise_scrolling = TRUE;
int gl_surface_mode = GL_SURFACE_IN_FRONT_OPAQUE;
int retina_enabled = FALSE;
HMODULE macdrv_module = 0;
+int enable_app_nap = FALSE;
CFDictionaryRef localized_strings;
@@ -197,6 +198,9 @@ static void setup_options(void)
gl_surface_mode = GL_SURFACE_IN_FRONT_OPAQUE;
}
+ if (!get_config_key(hkey, appkey, "EnableAppNap", buffer, sizeof(buffer)))
+ enable_app_nap = IS_OPTION_TRUE(buffer[0]);
+
/* Don't use appkey. The DPI and monitor sizes should be consistent for all
processes in the prefix. */
if (!get_config_key(hkey, NULL, "RetinaMode", buffer, sizeof(buffer)))