summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/os/macosx/macos.h4
-rw-r--r--src/os/macosx/macos.mm13
-rw-r--r--src/os/macosx/osx_stdafx.h1
-rw-r--r--src/video/cocoa/wnd_quickdraw.mm2
4 files changed, 9 insertions, 11 deletions
diff --git a/src/os/macosx/macos.h b/src/os/macosx/macos.h
index 3bdcbe387..247f4427d 100644
--- a/src/os/macosx/macos.h
+++ b/src/os/macosx/macos.h
@@ -25,6 +25,10 @@
#define MAC_OS_X_VERSION_10_5 1050
#endif
+#ifndef MAC_OS_X_VERSION_10_6
+#define MAC_OS_X_VERSION_10_6 1060
+#endif
+
/*
* Functions to show the popup window
diff --git a/src/os/macosx/macos.mm b/src/os/macosx/macos.mm
index 7c67e00c0..88cc71ade 100644
--- a/src/os/macosx/macos.mm
+++ b/src/os/macosx/macos.mm
@@ -182,21 +182,16 @@ const char *GetCurrentLocale(const char *)
/* Since Apple introduced encoding to CString in OSX 10.4 we have to make a few conditions
* to get the right code for the used version of OSX. */
-#if (MAC_OS_X_VERSION_MAX_ALLOWED == MAC_OS_X_VERSION_10_4)
- /* 10.4 can compile both versions just fine and will select the correct version at runtime based
- * on the version of OSX at execution time. */
+#if (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_4)
if (MacOSVersionIsAtLeast(10, 4, 0)) {
[ preferredLang getCString:retbuf maxLength:32 encoding:NSASCIIStringEncoding ];
} else
#endif
{
- [ preferredLang getCString:retbuf maxLength:32
-#if (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5)
- /* If 10.5+ is used to compile then encoding is needed here.
- * If 10.3 or 10.4 is used for compiling then this line is used by 10.3 and encoding should not be present here. */
- encoding:NSASCIIStringEncoding
+#if (MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_4)
+ /* maxLength does not include the \0 char in contrast to the call above. */
+ [ preferredLang getCString:retbuf maxLength:31 ];
#endif
- ];
}
return retbuf;
}
diff --git a/src/os/macosx/osx_stdafx.h b/src/os/macosx/osx_stdafx.h
index 3dab349ca..00b9ddb19 100644
--- a/src/os/macosx/osx_stdafx.h
+++ b/src/os/macosx/osx_stdafx.h
@@ -30,7 +30,6 @@
# error "Compiling 64 bits without _SQ64 set! (or vice versa)"
#endif
-#define MAC_OS_X_VERSION_MIN_REQUIRED MAC_OS_X_VERSION_10_3
#include <AvailabilityMacros.h>
/* Name conflict */
diff --git a/src/video/cocoa/wnd_quickdraw.mm b/src/video/cocoa/wnd_quickdraw.mm
index 561126f79..b3618cf81 100644
--- a/src/video/cocoa/wnd_quickdraw.mm
+++ b/src/video/cocoa/wnd_quickdraw.mm
@@ -16,7 +16,7 @@
#ifdef WITH_COCOA
#ifdef ENABLE_COCOA_QUICKDRAW
-#define MAC_OS_X_VERSION_MAX_ALLOWED MAC_OS_X_VERSION_10_3
+#define MAC_OS_X_VERSION_MIN_REQUIRED MAC_OS_X_VERSION_10_3
#include "../../stdafx.h"
#define Rect OTTDRect