Fixed bug #871
authorSam Lantinga <slouken@libsdl.org>
Mon, 02 Nov 2009 08:21:46 +0000
changeset 4659e6cc9037caf
parent 464 9a6369a63488
child 466 d3d060cb94a6
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
     1.1 --- a/native_midi/native_midi_macosx.c	Mon Oct 26 18:08:09 2009 +0000
     1.2 +++ b/native_midi/native_midi_macosx.c	Mon Nov 02 08:21:46 2009 +0000
     1.3 @@ -29,6 +29,7 @@
     1.4  
     1.5  #include <Carbon/Carbon.h>
     1.6  #include <AudioToolbox/AudioToolbox.h>
     1.7 +#include <AvailabilityMacros.h>
     1.8  
     1.9  #include "../SDL_mixer.h"
    1.10  #include "SDL_endian.h"
    1.11 @@ -106,7 +107,7 @@
    1.12          if (AUGraphGetIndNode(graph, i, &node) != noErr)
    1.13              continue;  /* better luck next time. */
    1.14  
    1.15 -        #if 1 /* this is deprecated, but works back to 10.0 */
    1.16 +#if MAC_OS_X_VERSION_MIN_REQUIRED <= MAC_OS_X_VERSION_10_4 /* this is deprecated, but works back to 10.0 */
    1.17          {
    1.18              struct ComponentDescription desc;
    1.19              UInt32 classdatasize = 0;
    1.20 @@ -196,11 +197,11 @@
    1.21      free(buf);
    1.22      buf = NULL;
    1.23  
    1.24 -    #if 1 /* this is deprecated, but works back to 10.3 */
    1.25 +    #if MAC_OS_X_VERSION_MIN_REQUIRED <= MAC_OS_X_VERSION_10_4 /* this is deprecated, but works back to 10.3 */
    1.26      if (MusicSequenceLoadSMFDataWithFlags(retval->sequence, data, 0) != noErr)
    1.27          goto fail;
    1.28      #else  /* not deprecated, but requires 10.5 or later */
    1.29 -    if (MusicSequenceLoadData(retval->sequence, data, 0, 0) != noErr)
    1.30 +    if (MusicSequenceFileLoadData(retval->sequence, data, 0, 0) != noErr)
    1.31          goto fail;
    1.32      #endif
    1.33