src/cdrom/macosx/SDL_syscdrom.c
changeset 1793 4d66375c2012
parent 1635 92947e3a18db
child 1662 782fd950bd46
child 1895 c121d94672cb
child 4159 a1b03ba2fcd0
--- 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 ();