Skip to content

Commit

Permalink
Fixed bug #871
Browse files Browse the repository at this point in the history
 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.
  • Loading branch information
slouken committed Nov 2, 2009
1 parent 70364f4 commit abd5798
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions native_midi/native_midi_macosx.c
Expand Up @@ -29,6 +29,7 @@

#include <Carbon/Carbon.h>
#include <AudioToolbox/AudioToolbox.h>
#include <AvailabilityMacros.h>

#include "../SDL_mixer.h"
#include "SDL_endian.h"
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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

Expand Down

0 comments on commit abd5798

Please sign in to comment.