summaryrefslogtreecommitdiff
path: root/src/music
diff options
context:
space:
mode:
authormichi_cc <michi_cc@openttd.org>2016-10-31 19:29:01 +0000
committermichi_cc <michi_cc@openttd.org>2016-10-31 19:29:01 +0000
commit94b3965989f23363a2863da7e819d6e8a8ff1214 (patch)
tree28799cb5fbd64a2c60c3c1288cbb128186722763 /src/music
parent51052f4961cea7203d2291b9b70ae865602b469e (diff)
downloadopenttd-94b3965989f23363a2863da7e819d6e8a8ff1214.tar.xz
(svn r27675) -Fix [FS#6502]: [OSX] Building with 10.11 or 10.12 SDKs.
Diffstat (limited to 'src/music')
-rw-r--r--src/music/cocoa_m.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/music/cocoa_m.cpp b/src/music/cocoa_m.cpp
index a201984ae..925dc21ab 100644
--- a/src/music/cocoa_m.cpp
+++ b/src/music/cocoa_m.cpp
@@ -30,6 +30,10 @@
#include "../safeguards.h"
+#if !defined(HAVE_OSX_1011_SDK)
+#define kMusicSequenceFile_AnyType 0
+#endif
+
static FMusicDriver_Cocoa iFMusicDriver_Cocoa;
@@ -68,7 +72,7 @@ static void DoSetVolume()
* risk compilation errors. The header AudioComponent.h
* was introduced in 10.6 so use it to decide which
* type definition to use. */
-#ifdef __AUDIOCOMPONENT_H__
+#if defined(__AUDIOCOMPONENT_H__) || defined(HAVE_OSX_107_SDK)
AudioComponentDescription desc;
#else
ComponentDescription desc;
@@ -159,7 +163,7 @@ void MusicDriver_Cocoa::PlaySong(const char *filename)
#if (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5)
if (MacOSVersionIsAtLeast(10, 5, 0)) {
- if (MusicSequenceFileLoad(_sequence, url, 0, 0) != noErr) {
+ if (MusicSequenceFileLoad(_sequence, url, kMusicSequenceFile_AnyType, 0) != noErr) {
DEBUG(driver, 0, "cocoa_m: Failed to load MIDI file");
CFRelease(url);
return;