Search
lxdream.org :: lxdream :: r469:3e2a0fde5cd8
lxdream 0.9.1
released Jun 29
Download Now
changeset469:3e2a0fde5cd8
parent468:3a49695e081a
child470:e09a16196693
authornkeynes
dateSun Oct 28 07:36:11 2007 +0000 (12 years ago)
Make the sure initial GD (if any) makes its way to the gui
src/gui/gdrom_menu.c
src/main.c
1.1 --- a/src/gui/gdrom_menu.c Sun Oct 28 07:23:46 2007 +0000
1.2 +++ b/src/gui/gdrom_menu.c Sun Oct 28 07:36:11 2007 +0000
1.3 @@ -1,5 +1,5 @@
1.4 /**
1.5 - * $Id: gdrom_menu.c,v 1.1 2007-10-27 05:44:54 nkeynes Exp $
1.6 + * $Id: gdrom_menu.c,v 1.2 2007-10-28 07:36:11 nkeynes Exp $
1.7 *
1.8 * Creates and manages the GD-Rom attachment menu.
1.9 *
1.10 @@ -105,12 +105,16 @@
1.11 }
1.12 }
1.13
1.14 -void gdrom_menu_open_file( const char *filename )
1.15 +gboolean gdrom_menu_open_file( const char *filename )
1.16 {
1.17 + gboolean result = FALSE;
1.18 if( filename != NULL ) {
1.19 - gdrom_mount_image(filename);
1.20 + result = gdrom_mount_image(filename);
1.21 }
1.22 - gdrom_menu_update_all();
1.23 + if( result ) {
1.24 + gdrom_menu_update_all();
1.25 + }
1.26 + return result;
1.27 }
1.28
1.29 void gdrom_menu_open_image_callback( GtkWidget *widget, gpointer user_data )
2.1 --- a/src/main.c Sun Oct 28 07:23:46 2007 +0000
2.2 +++ b/src/main.c Sun Oct 28 07:36:11 2007 +0000
2.3 @@ -1,5 +1,5 @@
2.4 /**
2.5 - * $Id: main.c,v 1.31 2007-10-27 05:44:54 nkeynes Exp $
2.6 + * $Id: main.c,v 1.32 2007-10-28 07:36:11 nkeynes Exp $
2.7 *
2.8 * Main program, initializes dreamcast and gui, then passes control off to
2.9 * the gtk main loop (currently).
2.10 @@ -178,7 +178,7 @@
2.11 INFO( "%s! ready...", APP_NAME );
2.12
2.13 for( ; optind < argc; optind++ ) {
2.14 - gboolean ok = gdrom_mount_image(argv[optind]);
2.15 + gboolean ok = gdrom_menu_open_file(argv[optind]);
2.16 if( !ok ) {
2.17 ok = file_load_magic( argv[optind] );
2.18 }
2.19 @@ -195,7 +195,7 @@
2.20 if( gdrom_get_current_disc() == NULL ) {
2.21 disc_file = lxdream_get_config_value( CONFIG_GDROM );
2.22 if( disc_file != NULL ) {
2.23 - gdrom_mount_image( disc_file );
2.24 + gdrom_menu_open_file( disc_file );
2.25 }
2.26 } else {
2.27 lxdream_set_global_config_value( CONFIG_GDROM, gdrom_get_current_disc()->name );
.