From abd5798f63cdebfd6ead894246063ff07fb05151 Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Mon, 2 Nov 2009 08:21:46 +0000 Subject: [PATCH] Fixed bug #871 C.W. Betts 2009-11-02 00:16:21 PST I noticed when looking through the SVN's source code that there were a few functions that were available for 10.5, but were unused in the 64-bit code. This patch fixes that, as well as a spelling mistake in one of the functions. Although I did use MAC_OS_X_VERSION_MIN_REQUIRED <= MAC_OS_X_VERSION_10_4, a simple check of !__LP64__ could have been done instead. --- native_midi/native_midi_macosx.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/native_midi/native_midi_macosx.c b/native_midi/native_midi_macosx.c index 9424cdac..a9b507bb 100644 --- a/native_midi/native_midi_macosx.c +++ b/native_midi/native_midi_macosx.c @@ -29,6 +29,7 @@ #include #include +#include #include "../SDL_mixer.h" #include "SDL_endian.h" @@ -106,7 +107,7 @@ GetSequenceAudioUnit(MusicSequence sequence, AudioUnit *aunit) if (AUGraphGetIndNode(graph, i, &node) != noErr) continue; /* better luck next time. */ - #if 1 /* this is deprecated, but works back to 10.0 */ +#if MAC_OS_X_VERSION_MIN_REQUIRED <= MAC_OS_X_VERSION_10_4 /* this is deprecated, but works back to 10.0 */ { struct ComponentDescription desc; UInt32 classdatasize = 0; @@ -196,11 +197,11 @@ NativeMidiSong *native_midi_loadsong_RW(SDL_RWops *rw) free(buf); buf = NULL; - #if 1 /* this is deprecated, but works back to 10.3 */ + #if MAC_OS_X_VERSION_MIN_REQUIRED <= MAC_OS_X_VERSION_10_4 /* this is deprecated, but works back to 10.3 */ if (MusicSequenceLoadSMFDataWithFlags(retval->sequence, data, 0) != noErr) goto fail; #else /* not deprecated, but requires 10.5 or later */ - if (MusicSequenceLoadData(retval->sequence, data, 0, 0) != noErr) + if (MusicSequenceFileLoadData(retval->sequence, data, 0, 0) != noErr) goto fail; #endif