vlc | branch: master | Felix Paul Kühne <[email protected]> | Tue Jun 14 17:35:13 2016 +0200| [a8ae0bd01014e5cc05f618a1b1228a214d84229d] | committer: Felix Paul Kühne
macosx/input manager: reverse logic > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=a8ae0bd01014e5cc05f618a1b1228a214d84229d --- modules/gui/macosx/InputManager.m | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/modules/gui/macosx/InputManager.m b/modules/gui/macosx/InputManager.m index ff73159..e019fec 100644 --- a/modules/gui/macosx/InputManager.m +++ b/modules/gui/macosx/InputManager.m @@ -316,19 +316,19 @@ static int InputEvent(vlc_object_t *p_this, const char *psz_var, IOReturn success; /* work-around a bug in 10.7.4 and 10.7.5, so check for 10.7.x < 10.7.4 and 10.8 */ - if ((NSAppKitVersionNumber >= 1115.2 && NSAppKitVersionNumber < 1138.45) || OSX_MOUNTAIN_LION || OSX_MAVERICKS || OSX_YOSEMITE || OSX_EL_CAPITAN) { + if (NSAppKitVersionNumber < 1115.2) { + /* fall-back on the 10.5 mode, which also works on 10.7.4 and 10.7.5 */ + if ([o_main activeVideoPlayback] && shouldDisableScreensaver) + success = IOPMAssertionCreate(kIOPMAssertionTypeNoDisplaySleep, kIOPMAssertionLevelOn, &systemSleepAssertionID); + else + success = IOPMAssertionCreate(kIOPMAssertionTypeNoIdleSleep, kIOPMAssertionLevelOn, &systemSleepAssertionID); + } else { CFStringRef reasonForActivity = CFStringCreateWithCString(kCFAllocatorDefault, _("VLC media playback"), kCFStringEncodingUTF8); if ([o_main activeVideoPlayback] && shouldDisableScreensaver) success = IOPMAssertionCreateWithName(kIOPMAssertionTypeNoDisplaySleep, kIOPMAssertionLevelOn, reasonForActivity, &systemSleepAssertionID); else success = IOPMAssertionCreateWithName(kIOPMAssertionTypeNoIdleSleep, kIOPMAssertionLevelOn, reasonForActivity, &systemSleepAssertionID); CFRelease(reasonForActivity); - } else { - /* fall-back on the 10.5 mode, which also works on 10.7.4 and 10.7.5 */ - if ([o_main activeVideoPlayback] && shouldDisableScreensaver) - success = IOPMAssertionCreate(kIOPMAssertionTypeNoDisplaySleep, kIOPMAssertionLevelOn, &systemSleepAssertionID); - else - success = IOPMAssertionCreate(kIOPMAssertionTypeNoIdleSleep, kIOPMAssertionLevelOn, &systemSleepAssertionID); } if (success == kIOReturnSuccess) _______________________________________________ vlc-commits mailing list [email protected] https://mailman.videolan.org/listinfo/vlc-commits
