pcsxr/macosx/Source/PcsxrDiscHandler.m
SND\MaddTheSane_cp 1ca710ff8f OS X: only store the sjis string from the memory card:
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
2014-09-08 15:01:26 +00:00

59 lines
1.3 KiB
Objective-C
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

//
// 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