Search
lxdream.org :: lxdream/src/gdlist.c :: diff
lxdream 0.9.1
released Jun 29
Download Now
filename src/gdlist.c
changeset 1034:7044e01148f0
prev755:ab873907b00e
next1036:af7b0c5905dd
author nkeynes
date Wed Jun 24 02:41:12 2009 +0000 (12 years ago)
permissions -rw-r--r--
last change Add initial VMU support
file annotate diff log raw
1.1 --- a/src/gdlist.c Mon Jul 21 00:08:34 2008 +0000
1.2 +++ b/src/gdlist.c Wed Jun 24 02:41:12 2009 +0000
1.3 @@ -65,18 +65,7 @@
1.4 */
1.5 void gdrom_list_update_config()
1.6 {
1.7 - GList *ptr;
1.8 - int size = 0;
1.9 - for( ptr = gdrom_recent_list; ptr != NULL; ptr = g_list_next(ptr) ) {
1.10 - size += strlen( (gchar *)ptr->data ) + 1;
1.11 - }
1.12 - char buf[size];
1.13 - strcpy( buf, (gchar *)gdrom_recent_list->data );
1.14 - for( ptr = g_list_next(gdrom_recent_list); ptr != NULL; ptr = g_list_next(ptr) ) {
1.15 - strcat( buf, ":" );
1.16 - strcat( buf, (gchar *)ptr->data );
1.17 - }
1.18 - lxdream_set_global_config_value( CONFIG_RECENT, buf );
1.19 + lxdream_set_global_config_list_value( CONFIG_RECENT, gdrom_recent_list );
1.20 }
1.21
1.22
1.23 @@ -146,17 +135,9 @@
1.24
1.25 void gdrom_list_init()
1.26 {
1.27 - const gchar *recent = lxdream_get_config_value( CONFIG_RECENT );
1.28 + gdrom_recent_list = lxdream_get_global_config_list_value( CONFIG_RECENT );
1.29 register_gdrom_disc_change_hook( gdrom_list_disc_changed, NULL );
1.30 gdrom_device_list = cdrom_get_native_devices();
1.31 - if( recent != NULL ) {
1.32 - gchar **list = g_strsplit(recent, ":", MAX_RECENT_ITEMS);
1.33 - int i;
1.34 - for( i=0; list[i] != NULL; i++ ) {
1.35 - gdrom_recent_list = g_list_append( gdrom_recent_list, g_strdup(list[i]) );
1.36 - }
1.37 - g_strfreev(list);
1.38 - }
1.39 gdrom_device_count = g_list_length(gdrom_device_list);
1.40 gdrom_recent_count = g_list_length(gdrom_recent_list);
1.41
.