Apply patch to first unlock the CD before trying to eject it. Since
SDL doesn't seem to have lock/unlock primitives, this looks like the
right thing to do.

Fixes audio/tcd's eject function too.

--HG--
branch : SDL-1.2
This commit is contained in:
Sam Lantinga
2009-10-16 05:05:21 +00:00
parent a225b3fe43
commit 7b8a094162

View File

@@ -391,6 +391,7 @@ static int SDL_SYS_CDStop(SDL_CD *cdrom)
/* Eject the CD-ROM */
static int SDL_SYS_CDEject(SDL_CD *cdrom)
{
SDL_SYS_CDioctl(cdrom->id, CDIOCALLOW, 0);
return(SDL_SYS_CDioctl(cdrom->id, CDIOCEJECT, 0));
}