Search
lxdream.org :: lxdream/src/gdlist.c :: diff
lxdream 0.9.1
released Jun 29
Download Now
filename src/gdlist.c
changeset 709:18c39a8e504c
prev696:3b224db916e3
next736:a02d1475ccfd
author nkeynes
date Wed Jun 25 10:40:45 2008 +0000 (13 years ago)
permissions -rw-r--r--
last change Commit OSX CD-ROM driver work-in-progress
file annotate diff log raw
1.1 --- a/src/gdlist.c Sun Jun 22 03:59:56 2008 +0000
1.2 +++ b/src/gdlist.c Wed Jun 25 10:40:45 2008 +0000
1.3 @@ -43,9 +43,9 @@
1.4 GList *ptr;
1.5
1.6 for( ptr = gdrom_device_list; ptr != NULL; ptr = g_list_next(ptr) ) {
1.7 - gchar *device = (gchar *)ptr->data;
1.8 + gdrom_device_t device = (gdrom_device_t)ptr->data;
1.9 posn++;
1.10 - if( strcmp(device, name) == 0 ) {
1.11 + if( strcmp(device->name, name) == 0 ) {
1.12 return posn;
1.13 }
1.14 }
1.15 @@ -148,7 +148,7 @@
1.16 {
1.17 const gchar *recent = lxdream_get_config_value( CONFIG_RECENT );
1.18 register_gdrom_disc_change_hook( gdrom_list_disc_changed, NULL );
1.19 - gdrom_device_list = gdrom_get_native_devices();
1.20 + gdrom_device_list = cdrom_get_native_devices();
1.21 if( recent != NULL ) {
1.22 gchar **list = g_strsplit(recent, ":", MAX_RECENT_ITEMS);
1.23 int i;
1.24 @@ -172,8 +172,8 @@
1.25 }
1.26
1.27 if( posn <= gdrom_device_count ) {
1.28 - gchar *entry = g_list_nth_data(gdrom_device_list, posn-1);
1.29 - return gdrom_mount_image(entry);
1.30 + gdrom_device_t device = g_list_nth_data(gdrom_device_list, posn-1);
1.31 + return gdrom_mount_image(device->name);
1.32 }
1.33
1.34 posn -= FIRST_RECENT_INDEX;
1.35 @@ -207,7 +207,8 @@
1.36 }
1.37
1.38 if( posn <= gdrom_device_count ) {
1.39 - return g_list_nth_data(gdrom_device_list, posn-1);
1.40 + gdrom_device_t device = g_list_nth_data(gdrom_device_list, posn-1);
1.41 + return device->device_name;
1.42 }
1.43
1.44 if( posn == gdrom_device_count + 1) {
1.45 @@ -229,7 +230,8 @@
1.46 }
1.47
1.48 if( posn <= gdrom_device_count ) {
1.49 - return g_list_nth_data(gdrom_device_list, posn-1);
1.50 + gdrom_device_t device = g_list_nth_data(gdrom_device_list, posn-1);
1.51 + return device->name;
1.52 }
1.53
1.54 if( posn == gdrom_device_count + 1) {
.