1ca710ff8f
The sjis title returned from GetMcdBlockInfo is is the latin title with Shift Japanese added, use that exclusively for PcsxrMemoryObject's name string. git-svn-id: https://pcsxr.svn.codeplex.com/svn/pcsxr@91359 e17a0e51-4ae3-4d35-97c3-1a29b211df97
59 lines
1.3 KiB
Objective-C
59 lines
1.3 KiB
Objective-C
//
|
||
// PcsxrDiscHandler.m
|
||
// Pcsxr
|
||
//
|
||
// Created by Charles Betts on 12/11/11.
|
||
// Copyright (c) 2011 __MyCompanyName__. All rights reserved.
|
||
//
|
||
|
||
#import "PcsxrDiscHandler.h"
|
||
#import "EmuThread.h"
|
||
#include "psxcommon.h"
|
||
#include "plugins.h"
|
||
#include "cdrom.h"
|
||
#import "RecentItemsMenu.h"
|
||
#import "PcsxrController.h"
|
||
|
||
@interface PcsxrDiscHandler ()
|
||
@property (nonatomic, strong) NSURL *discURL;
|
||
@property (weak) NSString *discPath;
|
||
@end
|
||
|
||
@implementation PcsxrDiscHandler
|
||
@synthesize discURL = _discURL;
|
||
- (NSURL*)discURL
|
||
{
|
||
if (!_discURL) {
|
||
self.discURL = [NSURL fileURLWithPath:discPath];
|
||
}
|
||
return _discURL;
|
||
}
|
||
|
||
@synthesize discPath;
|
||
|
||
+ (NSArray *)supportedUTIs
|
||
{
|
||
static NSArray *utisupport = nil;
|
||
if (utisupport == nil) {
|
||
utisupport = @[@"com.alcohol-soft.mdfdisc", @"com.goldenhawk.cdrwin-cuesheet",
|
||
@"com.apple.disk-image-ndif", @"public.iso-image", @"com.sony.psp.firmware",
|
||
@"com.codeplex.pcsxr.compressed-bin-image", @"com.coppertino.vox.cue",
|
||
@"com.apple.macbinary-archive"];
|
||
}
|
||
return utisupport;
|
||
}
|
||
|
||
- (BOOL)handleFile:(NSString *)theFile
|
||
{
|
||
self.discPath = theFile;
|
||
PcsxrController *appDelegate = [(NSApplication*)NSApp delegate];
|
||
if ([EmuThread active] == YES && !UsingIso()) {
|
||
return NO;
|
||
}
|
||
[appDelegate runURL:[self discURL]];
|
||
[[appDelegate recentItems] addRecentItem:[self discURL]];
|
||
return YES;
|
||
}
|
||
|
||
@end
|