Mercurial > sdl-ios-xcode
comparison src/cdrom/macosx/SDL_syscdrom.c @ 1793:4d66375c2012
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
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Tue, 09 May 2006 07:52:04 +0000 |
parents | 92947e3a18db |
children | 782fd950bd46 c121d94672cb a1b03ba2fcd0 |
comparison
equal
deleted
inserted
replaced
1792:409974dedf2e | 1793:4d66375c2012 |
---|---|
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; |