diff options
| author | SND\weimingzhi_cp <SND\weimingzhi_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97> | 2010-07-08 00:57:10 +0000 |
|---|---|---|
| committer | SND\weimingzhi_cp <SND\weimingzhi_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97> | 2010-07-08 00:57:10 +0000 |
| commit | 96f5bed67cf3027b33c4bec426fb7833d9f5ab58 (patch) | |
| tree | c294648c045a6ed0a573ad55045562a245d71a23 /plugins | |
| parent | 1a0d87b376b4400a58b1441f7a536cf5bc7f54ce (diff) | |
| download | pcsxr-96f5bed67cf3027b33c4bec426fb7833d9f5ab58.tar.gz | |
abusing the svn repository to copy the code from GNU/Linux host and FreeBSD in virtualbox :)
git-svn-id: https://pcsxr.svn.codeplex.com/svn/pcsxr@54330 e17a0e51-4ae3-4d35-97c3-1a29b211df97
Diffstat (limited to 'plugins')
| -rw-r--r-- | plugins/dfcdrom/cdr.h | 3 | ||||
| -rw-r--r-- | plugins/dfcdrom/cdrcfg-0.1df/main.c | 15 |
2 files changed, 16 insertions, 2 deletions
diff --git a/plugins/dfcdrom/cdr.h b/plugins/dfcdrom/cdr.h index fab260e5..5ebdbbc0 100644 --- a/plugins/dfcdrom/cdr.h +++ b/plugins/dfcdrom/cdr.h @@ -76,6 +76,9 @@ struct cdrom_msf { #ifdef __FreeBSD__ +#include <sys/disklabel.h> +#include <sys/cdio.h> + #define DEV_DEF "/dev/acd0" #else diff --git a/plugins/dfcdrom/cdrcfg-0.1df/main.c b/plugins/dfcdrom/cdrcfg-0.1df/main.c index 0563eb70..2ab7c851 100644 --- a/plugins/dfcdrom/cdrcfg-0.1df/main.c +++ b/plugins/dfcdrom/cdrcfg-0.1df/main.c @@ -28,7 +28,6 @@ GtkWidget *MainWindow; // function to check if the device is a cdrom int is_cdrom(const char *device) { -#ifdef __linux__ struct stat st; int fd = -1; @@ -41,6 +40,7 @@ int is_cdrom(const char *device) { // try to open the device file descriptor if ((fd = open(device, O_RDONLY | O_NONBLOCK)) < 0) return 0; +#ifdef __linux__ // I need a method to check is a device is really a CD-ROM. // some problems/ideas are: // - different protocls (ide, scsi, old proprietary...) @@ -62,9 +62,9 @@ int is_cdrom(const char *device) { close(fd); return 0; } +#endif close(fd); -#endif // yes, it seems a CD drive! return 1; @@ -83,6 +83,7 @@ void fill_drives_list(GtkWidget *widget) { GtkListStore *store; GtkTreeIter iter; +#if defined (__linux__) static const char *cdrom_devices[] = { "/dev/cdrom", "/dev/cdrom0", @@ -107,6 +108,16 @@ void fill_drives_list(GtkWidget *widget) { "/dev/scd3", "/dev/optcd", NULL}; +#elif defined (__FreeBSD__) + static const char *cdrom_devices[] = { + "/dev/acd0", + "/dev/acd1", + "/dev/acd2", + "/dev/acd3", + NULL}; +#else + static const char *cdrom_devices[] = { NULL }; +#endif store = gtk_list_store_new(1, G_TYPE_STRING); |
