Date: Mon, 8 May 2006 14:19:30 -0700
authorSam Lantinga <slouken@libsdl.org>
Tue, 09 May 2006 07:52:04 +0000
changeset 1793 4d66375c2012
parent 1792 409974dedf2e
child 1794 5605a9820134
Date: Mon, 8 May 2006 14:19:30 -0700 From: Bob Ippolito Subject: SDL trunk (r2346) and Mac OS X As for all the Carbon warnings.. the two File Manager ones should be easy to get rid of, the QuickDraw ones won't be so easy since that requires actual refactoring. PBUnmountVol -> FSEjectVolumeSync FSClose -> FSCloseFork
src/cdrom/macosx/AudioFilePlayer.c
src/cdrom/macosx/SDL_syscdrom.c
--- a/src/cdrom/macosx/AudioFilePlayer.c	Tue May 09 07:50:28 2006 +0000
+++ b/src/cdrom/macosx/AudioFilePlayer.c	Tue May 09 07:52:04 2006 +0000
@@ -153,7 +153,7 @@
         }
     
         if (afp->mForkRefNum) {
-            FSClose (afp->mForkRefNum);
+            FSCloseFork (afp->mForkRefNum);
             afp->mForkRefNum = 0;
         }
         SDL_free(afp);
--- a/src/cdrom/macosx/SDL_syscdrom.c	Tue May 09 07:50:28 2006 +0000
+++ b/src/cdrom/macosx/SDL_syscdrom.c	Tue May 09 07:52:04 2006 +0000
@@ -453,8 +453,8 @@
 static int SDL_SYS_CDEject(SDL_CD *cdrom)
 {
     OSStatus err;
-	HParamBlockRec  pb;
-    
+    pid_t dissenter;
+
     if (fakeCD) {
         SDL_SetError (kErrorFakeDevice);
         return -1;
@@ -475,9 +475,7 @@
     status = CD_STOPPED;
     
 	/* Eject the volume */
-	pb.ioParam.ioNamePtr = NULL;
-	pb.ioParam.ioVRefNum = volumes[cdrom->id];
-	err = PBUnmountVol((ParamBlockRec *) &pb);
+	err = FSEjectVolumeSync(volumes[cdrom->id], kNilOptions, &dissenter);
 
 	if (err != noErr) {
         Unlock ();