Mercurial > sdl-ios-xcode
comparison src/cdrom/macosx/SDL_syscdrom.c @ 1659:14717b52abc0 SDL-1.3
Merge trunk-1.3-3
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Wed, 17 May 2006 08:18:28 +0000 |
parents | 92947e3a18db |
children | 782fd950bd46 c121d94672cb a1b03ba2fcd0 |
comparison
equal
deleted
inserted
replaced
1658:e49147870aac | 1659:14717b52abc0 |
---|---|
451 | 451 |
452 /* Eject the CD-ROM (Unmount the volume) */ | 452 /* Eject the CD-ROM (Unmount the volume) */ |
453 static int SDL_SYS_CDEject(SDL_CD *cdrom) | 453 static int SDL_SYS_CDEject(SDL_CD *cdrom) |
454 { | 454 { |
455 OSStatus err; | 455 OSStatus err; |
456 HParamBlockRec pb; | 456 pid_t dissenter; |
457 | 457 |
458 if (fakeCD) { | 458 if (fakeCD) { |
459 SDL_SetError (kErrorFakeDevice); | 459 SDL_SetError (kErrorFakeDevice); |
460 return -1; | 460 return -1; |
461 } | 461 } |
462 | 462 |
473 } | 473 } |
474 | 474 |
475 status = CD_STOPPED; | 475 status = CD_STOPPED; |
476 | 476 |
477 /* Eject the volume */ | 477 /* Eject the volume */ |
478 pb.ioParam.ioNamePtr = NULL; | 478 err = FSEjectVolumeSync(volumes[cdrom->id], kNilOptions, &dissenter); |
479 pb.ioParam.ioVRefNum = volumes[cdrom->id]; | |
480 err = PBUnmountVol((ParamBlockRec *) &pb); | |
481 | 479 |
482 if (err != noErr) { | 480 if (err != noErr) { |
483 Unlock (); | 481 Unlock (); |
484 SDL_SetError ("PBUnmountVol returned %d", err); | 482 SDL_SetError ("PBUnmountVol returned %d", err); |
485 return -4; | 483 return -4; |