patch-ab (from reinoud@NetBSD.org): SDL-1.2
authorSam Lantinga <slouken@libsdl.org>
Fri, 16 Oct 2009 05:05:21 +0000
branchSDL-1.2
changeset 4342 f2800721813d
parent 4341 262d62627860
child 4343 d380e7a6265b
patch-ab (from reinoud@NetBSD.org): 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.
src/cdrom/openbsd/SDL_syscdrom.c
--- a/src/cdrom/openbsd/SDL_syscdrom.c	Fri Oct 16 04:29:27 2009 +0000
+++ b/src/cdrom/openbsd/SDL_syscdrom.c	Fri Oct 16 05:05:21 2009 +0000
@@ -391,6 +391,7 @@
 /* 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));
 }