Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/intern
diff options
context:
space:
mode:
authorJens Verwiebe <info@jensverwiebe.de>2014-06-07 00:06:26 +0400
committerJens Verwiebe <info@jensverwiebe.de>2014-06-07 00:06:26 +0400
commitee812ce8804194c811b809ffa3bb24dd40bc11d8 (patch)
tree3319abae4a0c69e56faf3a713f466758ffcb439d /intern
parent8392e83e134c4a3d29289e88376425b30c11ac42 (diff)
OSX: Ideasman does not like using utsname, so i use the always satisfactorily working sysctl method now for runtime OS detection
Diffstat (limited to 'intern')
-rw-r--r--intern/ghost/intern/GHOST_WindowCocoa.mm10
1 files changed, 5 insertions, 5 deletions
diff --git a/intern/ghost/intern/GHOST_WindowCocoa.mm b/intern/ghost/intern/GHOST_WindowCocoa.mm
index f833fb30542..cc324d3dbcb 100644
--- a/intern/ghost/intern/GHOST_WindowCocoa.mm
+++ b/intern/ghost/intern/GHOST_WindowCocoa.mm
@@ -44,8 +44,7 @@
#include "GHOST_SystemCocoa.h"
#include "GHOST_Debug.h"
-/* OSX version detection @ runtime */
-#include <sys/utsname.h>
+#include <sys/sysctl.h>
#if MAC_OS_X_VERSION_MAX_ALLOWED < 1070
/* Lion style fullscreen support when building with the 10.6 SDK */
@@ -731,9 +730,10 @@ GHOST_WindowCocoa::GHOST_WindowCocoa(
//Starting with 10.9 (darwin 13.x.x), we always use Lion fullscreen, since it
//now has proper multi-monitor support for fullscreen
- struct utsname retval;
- uname(&retval);
- if (retval.release[0] == '1' && retval.release[1] <= '3') {
+ char darwin_ver[10];
+ size_t len = sizeof(darwin_ver);
+ sysctlbyname("kern.osrelease", &darwin_ver, &len, NULL, 0);
+ if(darwin_ver[0] == '1' && darwin_ver[1] <= '3') {
m_lionStyleFullScreen = true;
}