[vlc-commits] macosx: Fix wrong logic for 10.7.4 and 10.7.5 workaround

David Fuhrmann git at videolan.org
Sat Jun 10 21:27:27 CEST 2017


vlc | branch: master | David Fuhrmann <dfuhrmann at videolan.org> | Sat Jun 10 21:22:59 2017 +0200| [0396d2b15fef6c4b07b432d4f486b56d17ef82f4] | committer: David Fuhrmann

macosx: Fix wrong logic for 10.7.4 and 10.7.5 workaround

The old condition was always false, as is was describing
OSX versions smaller than Lion (which are not supported
anymore).

Regression from a8ae0bd01014e5cc05f618a1b1228a214d84229d

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=0396d2b15fef6c4b07b432d4f486b56d17ef82f4
---

 modules/gui/macosx/VLCInputManager.m | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/modules/gui/macosx/VLCInputManager.m b/modules/gui/macosx/VLCInputManager.m
index 67f38a0b21..538af31dec 100644
--- a/modules/gui/macosx/VLCInputManager.m
+++ b/modules/gui/macosx/VLCInputManager.m
@@ -325,8 +325,8 @@ 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) {
+        /* work-around a bug for OSX Lion, 10.7.4 and 10.7.5 only */
+        if (NSAppKitVersionNumber >= 1138.45  && !OSX_MOUNTAIN_LION_AND_HIGHER) {
             /* 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);



More information about the vlc-commits mailing list