revision 889:5baaea6d9722
summary |
tree |
shortlog |
changelog |
graph |
changeset |
raw | bz2 | zip | gz changeset | 889:5baaea6d9722 |
parent | 888:9892c970b95a |
child | 890:a9896953e9a1 |
author | nkeynes |
date | Mon Oct 20 06:19:07 2008 +0000 (15 years ago) |
Remove run button disabling, instead print an error when attempting to run in an unrunnable situation and stop.
src/cocoaui/cocoaui.c | view | annotate | diff | log | ||
src/dreamcast.c | view | annotate | diff | log | ||
src/gtkui/gtk_win.c | view | annotate | diff | log | ||
src/gtkui/gtkui.c | view | annotate | diff | log |
1.1 --- a/src/cocoaui/cocoaui.c Mon Oct 20 06:15:58 2008 +00001.2 +++ b/src/cocoaui/cocoaui.c Mon Oct 20 06:19:07 2008 +00001.3 @@ -273,32 +273,19 @@1.4 }1.5 - (void) run_action: (id)sender1.6 {1.7 - cocoa_gui_run_later();1.8 + if( !dreamcast_is_running() ) {1.9 + cocoa_gui_run_later();1.10 + }1.11 }1.12 - (void) run_immediate1.13 {1.14 dreamcast_run();1.15 + [mainWindow setRunning: NO];1.16 }1.17 - (void) gdrom_list_action: (id)sender1.18 {1.19 gdrom_list_set_selection( [sender tag] );1.20 }1.21 -- (BOOL)validateMenuItem: (NSMenuItem *)item1.22 -{1.23 - if( [item action] == @selector(run_action:) ) {1.24 - return dreamcast_can_run() ? YES : NO;1.25 - } else {1.26 - return YES;1.27 - }1.28 -}1.29 -- (BOOL)validateToolbarItem: (NSToolbarItem *)item1.30 -{1.31 - if( [item action] == @selector(run_action:) ) {1.32 - return dreamcast_can_run() ? YES : NO;1.33 - } else {1.34 - return YES;1.35 - }1.36 -}1.37 @end
2.1 --- a/src/dreamcast.c Mon Oct 20 06:15:58 2008 +00002.2 +++ b/src/dreamcast.c Mon Oct 20 06:19:07 2008 +00002.3 @@ -163,7 +163,12 @@2.4 void dreamcast_run( void )2.5 {2.6 int i;2.7 -2.8 +2.9 + if( !dreamcast_can_run() ) {2.10 + ERROR(_("No program is loaded, and no BIOS is configured (required to boot a CD image). To continue, either load a binary program, or set the path to your BIOS file in the Path Preferences"));2.11 + return;2.12 + }2.13 +2.14 if( dreamcast_state != STATE_RUNNING ) {2.15 for( i=0; i<num_modules; i++ ) {2.16 if( modules[i]->start != NULL )
3.1 --- a/src/gtkui/gtk_win.c Mon Oct 20 06:15:58 2008 +00003.2 +++ b/src/gtkui/gtk_win.c Mon Oct 20 06:19:07 2008 +00003.3 @@ -357,7 +357,7 @@3.4 {3.5 const char *text = running ? _("Running") : _("Stopped");3.6 gtk_gui_enable_action( "Pause", running );3.7 - gtk_gui_enable_action( "Run", !running && dreamcast_can_run() );3.8 + gtk_gui_enable_action( "Run", !running );3.9 main_window_set_status_text( win, text );3.10 }
4.1 --- a/src/gtkui/gtkui.c Mon Oct 20 06:15:58 2008 +00004.2 +++ b/src/gtkui/gtkui.c Mon Oct 20 06:19:07 2008 +00004.3 @@ -362,7 +362,7 @@4.4 void gtk_gui_update( void )4.5 {4.6 if( global_action_group ) {4.7 - gtk_gui_enable_action("Run", dreamcast_can_run() && !dreamcast_is_running() );4.8 + gtk_gui_enable_action("Run", !dreamcast_is_running() );4.9 gtk_gui_enable_action("Pause", dreamcast_is_running() );4.10 }4.11 if( debug_win ) {
.