(svn r27675) -Fix [FS#6502]: [OSX] Building with 10.11 or 10.12 SDKs.

This commit is contained in:
michi_cc
2016-10-31 19:29:01 +00:00
parent 51052f4961
commit 94b3965989
3 changed files with 32 additions and 11 deletions

View File

@@ -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;