revision 844:0e645cc6dc59
summary |
tree |
shortlog |
changelog |
graph |
changeset |
raw | bz2 | zip | gz changeset | 844:0e645cc6dc59 |
parent | 843:7936c1162ce9 |
child | 845:d6131bbe2219 |
author | nkeynes |
date | Sat Sep 06 05:21:57 2008 +0000 (15 years ago) |
Disable the run actions when the system can't run (missing from cocoa ui code)
1.1 --- a/src/cocoaui/cocoaui.c Tue Sep 02 23:24:47 2008 +00001.2 +++ b/src/cocoaui/cocoaui.c Sat Sep 06 05:21:57 2008 +00001.3 @@ -282,6 +282,22 @@1.4 {1.5 gdrom_list_set_selection( [sender tag] );1.6 }1.7 +- (BOOL)validateMenuItem: (NSMenuItem *)item1.8 +{1.9 + if( [item action] == @selector(run_action:) ) {1.10 + return dreamcast_can_run() ? YES : NO;1.11 + } else {1.12 + return YES;1.13 + }1.14 +}1.15 +- (BOOL)validateToolbarItem: (NSToolbarItem *)item1.16 +{1.17 + if( [item action] == @selector(run_action:) ) {1.18 + return dreamcast_can_run() ? YES : NO;1.19 + } else {1.20 + return YES;1.21 + }1.22 +}1.23 @end
.