filename | src/gdlist.c |
changeset | 1097:d4807997e450 |
prev | 1036:af7b0c5905dd |
next | 1109:700c5ab26a63 |
author | nkeynes |
date | Fri Jun 04 09:13:40 2010 +1000 (13 years ago) |
permissions | -rw-r--r-- |
last change | Add ability to wrap a binary program up in a virtual cd image (so that we can boot it normally) |
file | annotate | diff | log | raw |
1.1 --- a/src/gdlist.c Wed Jun 24 06:06:40 2009 +00001.2 +++ b/src/gdlist.c Fri Jun 04 09:13:40 2010 +10001.3 @@ -23,6 +23,7 @@1.4 #include <libgen.h>1.5 #include "gettext.h"1.6 #include "gdrom/gdrom.h"1.7 +#include "drivers/cdrom/drive.h"1.8 #include "gdlist.h"1.9 #include "lxdream.h"1.10 #include "config.h"1.11 @@ -43,7 +44,7 @@1.12 GList *ptr;1.14 for( ptr = gdrom_device_list; ptr != NULL; ptr = g_list_next(ptr) ) {1.15 - gdrom_device_t device = (gdrom_device_t)ptr->data;1.16 + cdrom_drive_t device = (cdrom_drive_t)ptr->data;1.17 posn++;1.18 if( strcmp(device->name, name) == 0 ) {1.19 return posn;1.20 @@ -99,7 +100,7 @@1.21 /**1.22 * Disc-changed callback from the GD-Rom driver. Updates the list accordingly.1.23 */1.24 -gboolean gdrom_list_disc_changed( gdrom_disc_t disc, const gchar *disc_name, void *user_data )1.25 +gboolean gdrom_list_disc_changed( cdrom_disc_t disc, const gchar *disc_name, void *user_data )1.26 {1.27 gboolean list_changed = FALSE;1.28 int posn = 0;1.29 @@ -137,7 +138,8 @@1.30 {1.31 gdrom_recent_list = lxdream_get_global_config_list_value( CONFIG_RECENT );1.32 register_gdrom_disc_change_hook( gdrom_list_disc_changed, NULL );1.33 - gdrom_device_list = cdrom_get_native_devices();1.34 + cdrom_drive_scan();1.35 + gdrom_device_list = cdrom_drive_get_list();1.36 gdrom_device_count = g_list_length(gdrom_device_list);1.37 gdrom_recent_count = g_list_length(gdrom_recent_list);1.39 @@ -153,7 +155,7 @@1.40 }1.42 if( posn <= gdrom_device_count ) {1.43 - gdrom_device_t device = g_list_nth_data(gdrom_device_list, posn-1);1.44 + cdrom_drive_t device = g_list_nth_data(gdrom_device_list, posn-1);1.45 return gdrom_mount_image(device->name);1.46 }1.48 @@ -188,8 +190,8 @@1.49 }1.51 if( posn <= gdrom_device_count ) {1.52 - gdrom_device_t device = g_list_nth_data(gdrom_device_list, posn-1);1.53 - return device->device_name;1.54 + cdrom_drive_t device = g_list_nth_data(gdrom_device_list, posn-1);1.55 + return device->display_name;1.56 }1.58 if( posn == gdrom_device_count + 1) {1.59 @@ -211,7 +213,7 @@1.60 }1.62 if( posn <= gdrom_device_count ) {1.63 - gdrom_device_t device = g_list_nth_data(gdrom_device_list, posn-1);1.64 + cdrom_drive_t device = g_list_nth_data(gdrom_device_list, posn-1);1.65 return device->name;1.66 }
.