Changes since SDL 1.2.0 release

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%402
This commit is contained in:
Sam Lantinga 2001-04-26 16:50:19 +00:00
parent 2f110628a7
commit 9b6cc5a90d
40 changed files with 1225 additions and 105 deletions

View file

@ -36,6 +36,7 @@ static char rcsid =
#include <string.h>
#include <errno.h>
#include <unistd.h>
#include <sys/ioctl.h>
#include <sys/cdio.h>
#include "SDL_error.h"
@ -64,7 +65,8 @@ static void SDL_SYS_CDClose(SDL_CD *cdrom);
/* Some ioctl() errno values which occur when the tray is empty */
#define ERRNO_TRAYEMPTY(errno) \
((errno == EIO) || (errno == ENOENT) || (errno == EINVAL))
((errno == EIO) || (errno == ENOENT) || (errno == EINVAL) || \
(errno == ENODEV))
/* Check a drive to see if it is a CD-ROM */
static int CheckDrive(char *drive, struct stat *stbuf)
@ -96,6 +98,8 @@ static int CheckDrive(char *drive, struct stat *stbuf)
}
close(cdfd);
}
else if (ERRNO_TRAYEMPTY(errno))
is_cd = 1;
}
return(is_cd);
}
@ -137,7 +141,11 @@ static void AddDrive(char *drive, struct stat *stbuf)
int SDL_SYS_CDInit(void)
{
static char *checklist[] = {
#ifdef __OpenBSD__
"?0 cd?a", "cdrom", NULL
#else
"?0 cd?c", "?0 acd?c", "cdrom", NULL
#endif
};
char *SDLcdrom;
int i, j, exists;