mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-08-02 22:29:21 +00:00
Frame: Use kIOPMAssertionTypePreventUserIdleDisplaySleep to inhibit screensaver on macOS
This commit is contained in:
parent
c9b2c29ead
commit
4537969822
1 changed files with 3 additions and 2 deletions
|
@ -714,8 +714,9 @@ void CFrame::InhibitScreensaver()
|
||||||
if (SConfig::GetInstance().bDisableScreenSaver)
|
if (SConfig::GetInstance().bDisableScreenSaver)
|
||||||
{
|
{
|
||||||
CFStringRef reason_for_activity = CFSTR("Emulation Running");
|
CFStringRef reason_for_activity = CFSTR("Emulation Running");
|
||||||
if (IOPMAssertionCreateWithName(kIOPMAssertionTypeNoDisplaySleep, kIOPMAssertionLevelOn,
|
if (IOPMAssertionCreateWithName(kIOPMAssertionTypePreventUserIdleDisplaySleep,
|
||||||
reason_for_activity, &m_power_assertion) != kIOReturnSuccess)
|
kIOPMAssertionLevelOn, reason_for_activity,
|
||||||
|
&m_power_assertion) != kIOReturnSuccess)
|
||||||
{
|
{
|
||||||
m_power_assertion = kIOPMNullAssertionID;
|
m_power_assertion = kIOPMNullAssertionID;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue