--- a/src/dreamcast.c Mon Feb 15 17:27:14 2010 +1000 +++ b/src/dreamcast.c Thu Jun 10 22:13:16 2010 +1000 @@ -448,7 +448,7 @@ return NULL; } -int dreamcast_load_state( const gchar *filename ) +gboolean dreamcast_load_state( const gchar *filename ) { int i,j; int module_count; @@ -456,13 +456,13 @@ int have_read[MAX_MODULES]; FILE *f = fopen( filename, "r" ); - if( f == NULL ) return errno; + if( f == NULL ) return FALSE; module_count = dreamcast_read_save_state_header(f, error, sizeof(error)); if( module_count <= 0 ) { ERROR( error ); fclose(f); - return 1; + return FALSE; } for( i=0; iload == NULL ) { ERROR( "%s save state is corrupted (no loader for %s)", APP_NAME, modules[j]->name ); fclose(f); - return 2; + return FALSE; } else if( modules[j]->load(f) != 0 ) { ERROR( "%s save state is corrupted (%s failed)", APP_NAME, modules[j]->name ); fclose(f); - return 2; + return FALSE; } break; } @@ -497,7 +497,7 @@ if( j == num_modules ) { fclose(f); ERROR( "%s save state contains unrecognized section", APP_NAME ); - return 2; + return FALSE; } } @@ -512,7 +512,7 @@ } fclose(f); INFO( "Save state read from %s", filename ); - return 0; + return TRUE; } int dreamcast_save_state( const gchar *filename )