winemac: Disable macOS's App Nap energy-saving feature by default for Wine GUI processes.
commit250944b64304ee85d92955d2a901268ab08b720e
authorKen Thomases <ken@codeweavers.com>
Mon, 16 Jul 2018 03:54:15 +0000 (15 22:54 -0500)
committerAlexandre Julliard <julliard@winehq.org>
Mon, 16 Jul 2018 07:20:10 +0000 (16 09:20 +0200)
tree8a44e10b767be3f7c690ef7b4c5689d93ce46ac2
parent650997d71db173c59a6480998168d5b89b7688c3
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@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
dlls/winemac.drv/cocoa_app.m
dlls/winemac.drv/macdrv_cocoa.h
dlls/winemac.drv/macdrv_main.c