Search
lxdream.org :: lxdream :: r844:0e645cc6dc59
lxdream 0.9.1
released Jun 29
Download Now
changeset844:0e645cc6dc59
parent843:7936c1162ce9
child845:d6131bbe2219
authornkeynes
dateSat 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)
src/cocoaui/cocoaui.c
1.1 --- a/src/cocoaui/cocoaui.c Tue Sep 02 23:24:47 2008 +0000
1.2 +++ b/src/cocoaui/cocoaui.c Sat Sep 06 05:21:57 2008 +0000
1.3 @@ -282,6 +282,22 @@
1.4 {
1.5 gdrom_list_set_selection( [sender tag] );
1.6 }
1.7 +- (BOOL)validateMenuItem: (NSMenuItem *)item
1.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 *)item
1.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
1.24
1.25
.