Disable the net plug-in in the freeze state handler on demand.
Run the disc image from the handler through PcsxrController so that it can disable the net plug-in as needed. Cache the NSURL value in the Disc handler. git-svn-id: https://pcsxr.svn.codeplex.com/svn/pcsxr@85563 e17a0e51-4ae3-4d35-97c3-1a29b211df97
This commit is contained in:
parent
cedd6e7734
commit
e80786f8fa
|
@ -10,5 +10,8 @@
|
|||
#import "PcsxrFileHandle.h"
|
||||
|
||||
@interface PcsxrDiscHandler : NSObject <PcsxrFileHandle>
|
||||
{
|
||||
NSURL *discURL;
|
||||
}
|
||||
|
||||
@end
|
||||
|
|
|
@ -14,8 +14,22 @@
|
|||
#import "RecentItemsMenu.h"
|
||||
#import "PcsxrController.h"
|
||||
|
||||
@interface PcsxrDiscHandler ()
|
||||
@property (retain) NSURL *discURL;
|
||||
@end
|
||||
|
||||
@implementation PcsxrDiscHandler
|
||||
|
||||
@synthesize discURL;
|
||||
|
||||
- (NSURL*)discURLFromFilePath:(NSString *)filePath
|
||||
{
|
||||
if (!discURL) {
|
||||
self.discURL = [NSURL fileURLWithPath:filePath isDirectory:NO];
|
||||
}
|
||||
return self.discURL;
|
||||
}
|
||||
|
||||
+ (NSArray *)supportedUTIs
|
||||
{
|
||||
static NSArray *utisupport = nil;
|
||||
|
@ -38,11 +52,19 @@
|
|||
return NO;
|
||||
}
|
||||
} else {
|
||||
SetIsoFile([theFile fileSystemRepresentation]);
|
||||
[EmuThread run];
|
||||
[appDelegate runURL:[self discURLFromFilePath:theFile]];
|
||||
}
|
||||
[[appDelegate recentItems] addRecentItem:[NSURL fileURLWithPath:theFile]];
|
||||
[[appDelegate recentItems] addRecentItem:[self discURLFromFilePath:theFile]];
|
||||
return YES;
|
||||
}
|
||||
|
||||
#if !__has_feature(objc_arc)
|
||||
- (void)dealloc
|
||||
{
|
||||
self.discURL = nil;
|
||||
|
||||
[super dealloc];
|
||||
}
|
||||
#endif
|
||||
|
||||
@end
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
#import "PcsxrFreezeStateHandler.h"
|
||||
#import "EmuThread.h"
|
||||
#import "ARCBridge.h"
|
||||
#import "PluginList.h"
|
||||
#include "misc.h"
|
||||
|
||||
@implementation PcsxrFreezeStateHandler
|
||||
|
@ -28,6 +29,13 @@
|
|||
return NO;
|
||||
}
|
||||
if (![EmuThread active]) {
|
||||
PluginList *pluginList = [PluginList list];
|
||||
if ([[NSUserDefaults standardUserDefaults] boolForKey:@"NetPlay"]) {
|
||||
[pluginList enableNetPlug];
|
||||
} else {
|
||||
[pluginList disableNetPlug];
|
||||
}
|
||||
|
||||
[EmuThread run];
|
||||
}
|
||||
return [EmuThread defrostAt:theFile];
|
||||
|
|
Loading…
Reference in New Issue