Fixed bug #861 SDL-1.2
authorSam Lantinga <slouken@libsdl.org>
Tue, 20 Oct 2009 03:45:06 +0000
branchSDL-1.2
changeset 43684c088d2b29eb
parent 4367 2d00ed718720
child 4369 f14cf9d71233
Fixed bug #861

C.W. Betts 2009-10-19 19:16:41 PDT

In 64-bit libraries, the fork reference is a different size than in 32-bit.
Apple has tried to help this transition by making a typedef called FSIORefNum,
but it is only available in Mac OS X 10.5 headers or later. I first noticed
this bug in Mac OS X's CD player code, and the patch is set to fix it
accordingly. This might also be an issue in SDL_QuartzVideo.m
src/cdrom/macosx/AudioFilePlayer.h
     1.1 --- a/src/cdrom/macosx/AudioFilePlayer.h	Mon Oct 19 10:09:58 2009 +0000
     1.2 +++ b/src/cdrom/macosx/AudioFilePlayer.h	Tue Oct 20 03:45:06 2009 +0000
     1.3 @@ -80,8 +80,12 @@
     1.4  
     1.5  /*private:*/
     1.6      AudioUnit                       mPlayUnit;
     1.7 -    SInt16                          mForkRefNum;
     1.8 -    
     1.9 +#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1050
    1.10 +    FSIORefNum                      mForkRefNum;
    1.11 +#else
    1.12 +    int                             mForkRefNum;
    1.13 +#endif
    1.14 +
    1.15      AURenderCallbackStruct          mInputCallback;
    1.16  
    1.17      AudioStreamBasicDescription     mFileDescription;