summaryrefslogtreecommitdiff
path: root/src/os
diff options
context:
space:
mode:
authorbjarni <bjarni@openttd.org>2007-11-30 13:26:24 +0000
committerbjarni <bjarni@openttd.org>2007-11-30 13:26:24 +0000
commit40cb6922bd4af836602846de9f9752da0e0abe84 (patch)
tree6de5e7a7d16658fd3ee19517762435165e9c8ca9 /src/os
parentf9f6c757f78e07582bad15a40847fc569aa03619 (diff)
downloadopenttd-40cb6922bd4af836602846de9f9752da0e0abe84.tar.xz
(svn r11540) -Fix: [OSX] Don't try to compile the quartz video driver on OSX 10.3. It will fail
Diffstat (limited to 'src/os')
-rw-r--r--src/os/macosx/macos.mm9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/os/macosx/macos.mm b/src/os/macosx/macos.mm
index def108059..1e97f57be 100644
--- a/src/os/macosx/macos.mm
+++ b/src/os/macosx/macos.mm
@@ -171,9 +171,18 @@ const char *GetCurrentLocale(const char *)
NSArray* languages = [defs objectForKey:@"AppleLanguages"];
NSString* preferredLang = [languages objectAtIndex:0];
/* preferredLang is either 2 or 5 characters long ("xx" or "xx_YY"). */
+
+ /* MacOS 10.3.9 can't handle encoding:NSASCIIStringEncoding
+ * we will completely disable compiling it for such old targets to avoid a warning */
+#if (MAC_OS_X_VERSION_MAX_ALLOWED > MAC_OS_X_VERSION_10_3)
+ /* Note: MAC_OS_X_VERSION_MAX_ALLOWED is the current OSX version/SDK by default */
if (MacOSVersionIsAtLeast(10, 4, 0)) {
[ preferredLang getCString:retbuf maxLength:32 encoding:NSASCIIStringEncoding ];
} else {
+#else
+ /* 10.3.9 needs to start the { too */
+ {
+#endif
[ preferredLang getCString:retbuf maxLength:32 ];
}
return retbuf;