1 .TH "SDL_CDStatus" "3" "Tue 11 Sep 2001, 22:58" "SDL" "SDL API Reference"
3 SDL_CDStatus\- Returns the current status of the given drive\&.
8 \fBCDstatus \fBSDL_CDStatus\fP\fR(\fBSDL_CD *cdrom\fR);
9 \fB/* Given a status, returns true if there\&'s a disk in the drive */
10 #define CD_INDRIVE(status) ((int)status > 0)
13 This function returns the current status of the given drive\&. Status is described like so:
26 If the drive has a CD in it, the table of contents of the CD and current play position of the CD will be stored in the SDL_CD structure\&.
28 The macro \fBCD_INDRIVE\fP is provided for convenience, and given a status returns true if there\&'s a disk in the drive\&.
33 \fBSDL_CDStatus\fP also updates the \fI\fBSDL_CD\fR\fR structure passed to it\&.
38 \f(CWint playTrack(int track)
42 if ( CD_INDRIVE(SDL_CDStatus(cdrom)) ) {
43 /* clamp to the actual number of tracks on the CD */
44 if (track >= cdrom->numtracks) {
45 track = cdrom->numtracks-1;
48 if ( SDL_CDPlayTracks(cdrom, track, 0, 1, 0) == 0 ) {
59 ...\" created by instant / docbook-to-man, Tue 11 Sep 2001, 22:58