git-svn-id: https://pcsxr.svn.codeplex.com/svn/pcsxr@35399 e17a0e51-4ae3-4d35-97c3-1a29b211df97
This commit is contained in:
parent
559fd026bb
commit
ea688720ca
|
@ -30,6 +30,7 @@
|
|||
|
||||
+ (BOOL)isPaused;
|
||||
+ (BOOL)active;
|
||||
+ (BOOL)isRunBios;
|
||||
|
||||
+ (void)freezeAt:(NSString *)path which:(int)num;
|
||||
+ (BOOL)defrostAt:(NSString *)path;
|
||||
|
|
|
@ -19,6 +19,7 @@ EmuThread *emuThread;
|
|||
NSString *defrostPath = nil;
|
||||
static int safeEvent;
|
||||
static int paused;
|
||||
static int runbios;
|
||||
|
||||
static pthread_cond_t eventCond;
|
||||
static pthread_mutex_t eventMutex;
|
||||
|
@ -227,6 +228,7 @@ done:
|
|||
|
||||
safeEvent = EMUEVENT_NONE;
|
||||
paused = NO;
|
||||
runbios = NO;
|
||||
|
||||
if (SysInit() != 0) {
|
||||
pthread_mutex_unlock(&eventMutex);
|
||||
|
@ -262,6 +264,7 @@ done:
|
|||
|
||||
safeEvent = EMUEVENT_NONE;
|
||||
paused = NO;
|
||||
runbios = YES;
|
||||
|
||||
if (SysInit() != 0) {
|
||||
pthread_mutex_unlock(&eventMutex);
|
||||
|
@ -357,6 +360,11 @@ done:
|
|||
return paused;
|
||||
}
|
||||
|
||||
+ (BOOL)isRunBios
|
||||
{
|
||||
return runbios;
|
||||
}
|
||||
|
||||
+ (BOOL)active
|
||||
{
|
||||
return emuThread ? YES : NO;
|
||||
|
|
|
@ -154,11 +154,13 @@ NSString *saveStatePath;
|
|||
[menuItem setState:([EmuThread isPaused] ? NSOnState : NSOffState)];
|
||||
}
|
||||
|
||||
if ([menuItem action] == @selector(reset:) || [menuItem action] == @selector(pause:) ||
|
||||
[menuItem action] == @selector(ejectCD:) || [menuItem action] == @selector(freeze:) ||
|
||||
if ([menuItem action] == @selector(pause:) || [menuItem action] == @selector(freeze:) ||
|
||||
[menuItem action] == @selector(fullscreen:))
|
||||
return [EmuThread active];
|
||||
|
||||
if ([menuItem action] == @selector(reset:) || [menuItem action] == @selector(ejectCD:))
|
||||
return [EmuThread active] && ![EmuThread isRunBios];
|
||||
|
||||
if ([menuItem action] == @selector(runCD:) || [menuItem action] == @selector(runIso:) ||
|
||||
[menuItem action] == @selector(runBios:)) {
|
||||
if (preferenceWindow != nil)
|
||||
|
|
Loading…
Reference in New Issue
Block a user