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 4342f2800721813d
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
     1.1 --- a/src/cdrom/openbsd/SDL_syscdrom.c	Fri Oct 16 04:29:27 2009 +0000
     1.2 +++ b/src/cdrom/openbsd/SDL_syscdrom.c	Fri Oct 16 05:05:21 2009 +0000
     1.3 @@ -391,6 +391,7 @@
     1.4  /* Eject the CD-ROM */
     1.5  static int SDL_SYS_CDEject(SDL_CD *cdrom)
     1.6  {
     1.7 +	SDL_SYS_CDioctl(cdrom->id, CDIOCALLOW, 0);
     1.8  	return(SDL_SYS_CDioctl(cdrom->id, CDIOCEJECT, 0));
     1.9  }
    1.10