diff options
author | Jens Verwiebe <info@jensverwiebe.de> | 2014-06-06 00:14:14 +0400 |
---|---|---|
committer | Jens Verwiebe <info@jensverwiebe.de> | 2014-06-06 00:14:25 +0400 |
commit | 98bf3959b484216000c48d12666ce6120ca15f99 (patch) | |
tree | a2a1b0d6b1d59064562a03f1e8be2be05837a13b /intern | |
parent | 865dfa8a7e8c29b2a7f0aa3e6bcdfb3353e39052 (diff) |
OSX: replace deprecated (10.8 ) Gestalt function with utsname, no functional change
Diffstat (limited to 'intern')
-rw-r--r-- | intern/ghost/intern/GHOST_WindowCocoa.mm | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/intern/ghost/intern/GHOST_WindowCocoa.mm b/intern/ghost/intern/GHOST_WindowCocoa.mm index 95bf060776f..0dcc0fff86f 100644 --- a/intern/ghost/intern/GHOST_WindowCocoa.mm +++ b/intern/ghost/intern/GHOST_WindowCocoa.mm @@ -44,6 +44,9 @@ #include "GHOST_SystemCocoa.h" #include "GHOST_Debug.h" +/* OSX version detection @ runtime */ +#include <sys/utsname.h> + #if MAC_OS_X_VERSION_MAX_ALLOWED < 1070 /* Lion style fullscreen support when building with the 10.6 SDK */ enum { @@ -726,14 +729,14 @@ GHOST_WindowCocoa::GHOST_WindowCocoa( if (state == GHOST_kWindowStateFullScreen) setState(GHOST_kWindowStateFullScreen); - //Starting with 10.9, we always use Lion fullscreen, since it + //Starting with 10.9 (darwin 13.x.x), we always use Lion fullscreen, since it //now has proper multi-monitor support for fullscreen - struct { SInt32 major, minor; } systemversion; - Gestalt(gestaltSystemVersionMajor, &systemversion.major); - Gestalt(gestaltSystemVersionMinor, &systemversion.minor); - - m_lionStyleFullScreen = (systemversion.major > 10 || (systemversion.major == 10 && systemversion.minor >= 9)); - + struct utsname retval; + uname(&retval); + if(retval.release[0] == '1' && retval.release[1] <= '3') { + m_lionStyleFullScreen = true; + } + [pool drain]; } |