summaryrefslogtreecommitdiff
path: root/macosx/Source
diff options
context:
space:
mode:
authorSND\MaddTheSane_cp <SND\MaddTheSane_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97>2014-09-08 15:01:26 +0000
committerSND\MaddTheSane_cp <SND\MaddTheSane_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97>2014-09-08 15:01:26 +0000
commit1ca710ff8f4c5535d638ea31d3aae98a7791f485 (patch)
treebfa119868a049540e1f526a4404aa6a4eb38b3de /macosx/Source
parentb96092d6fbde83d1e3036a6591b0bed356526733 (diff)
downloadpcsxr-1ca710ff8f4c5535d638ea31d3aae98a7791f485.tar.gz
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
Diffstat (limited to 'macosx/Source')
-rw-r--r--macosx/Source/PcsxrDiscHandler.m2
-rw-r--r--macosx/Source/PcsxrMemCardController.m2
-rw-r--r--macosx/Source/PcsxrMemoryObject.h3
-rw-r--r--macosx/Source/PcsxrMemoryObject.m25
4 files changed, 9 insertions, 23 deletions
diff --git a/macosx/Source/PcsxrDiscHandler.m b/macosx/Source/PcsxrDiscHandler.m
index 996fdab3..f93f91d4 100644
--- a/macosx/Source/PcsxrDiscHandler.m
+++ b/macosx/Source/PcsxrDiscHandler.m
@@ -46,7 +46,7 @@
- (BOOL)handleFile:(NSString *)theFile
{
self.discPath = theFile;
- PcsxrController *appDelegate = [NSApp delegate];
+ PcsxrController *appDelegate = [(NSApplication*)NSApp delegate];
if ([EmuThread active] == YES && !UsingIso()) {
return NO;
}
diff --git a/macosx/Source/PcsxrMemCardController.m b/macosx/Source/PcsxrMemCardController.m
index 7dbc271a..1adf505b 100644
--- a/macosx/Source/PcsxrMemCardController.m
+++ b/macosx/Source/PcsxrMemCardController.m
@@ -121,7 +121,7 @@
availBlocks = [toCard availableBlocks];
if (freeConsBlocks == -1 && availBlocks >= cardSize) {
PcsxrMemoryObject *tmpmemobj = (fromCard.memoryArray)[selectedIndex];
- NSInteger copyOK = NSRunInformationalAlertPanel(NSLocalizedString(@"Free Size", nil), NSLocalizedString(@"Memory card %i does not have enough free consecutive blocks.\n\nIn order to copy over \"%@ (%@),\" memory card %i must be compressed. Compressing memory cards will make deleted blocks unrecoverable.\n\nDo you want to continue?", nil), NSLocalizedString(@"Yes", nil), NSLocalizedString(@"No", nil), nil, cardnum, tmpmemobj.englishName, tmpmemobj.sjisName, cardnum);
+ NSInteger copyOK = NSRunInformationalAlertPanel(NSLocalizedString(@"Free Size", nil), NSLocalizedString(@"Memory card %i does not have enough free consecutive blocks.\n\nIn order to copy over \"%@,\" memory card %i must be compressed. Compressing memory cards will make deleted blocks unrecoverable.\n\nDo you want to continue?", nil), NSLocalizedString(@"Yes", nil), NSLocalizedString(@"No", nil), nil, cardnum, tmpmemobj.name, cardnum);
if (copyOK != NSAlertDefaultReturn) {
return;
}
diff --git a/macosx/Source/PcsxrMemoryObject.h b/macosx/Source/PcsxrMemoryObject.h
index 39b44be5..80f63f57 100644
--- a/macosx/Source/PcsxrMemoryObject.h
+++ b/macosx/Source/PcsxrMemoryObject.h
@@ -28,8 +28,7 @@ typedef NS_ENUM(char, PCSXRMemFlags) {
- (NSImage*)memoryImageAtIndex:(NSInteger)idx;
-@property (readonly, strong) NSString *englishName;
-@property (readonly, strong) NSString *sjisName;
+@property (readonly, strong) NSString *name;
@property (readonly, strong) NSString *memName;
@property (readonly, strong) NSString *memID;
@property (readonly, strong) NSArray *memoryCardImages;
diff --git a/macosx/Source/PcsxrMemoryObject.m b/macosx/Source/PcsxrMemoryObject.m
index 4f564b86..87d6f2fd 100644
--- a/macosx/Source/PcsxrMemoryObject.m
+++ b/macosx/Source/PcsxrMemoryObject.m
@@ -10,8 +10,7 @@
#import "PcsxrMemoryObject.h"
@interface PcsxrMemoryObject ()
-@property (readwrite, strong) NSString *englishName;
-@property (readwrite, strong) NSString *sjisName;
+@property (readwrite, strong) NSString *name;
@property (readwrite, strong) NSString *memName;
@property (readwrite, strong) NSString *memID;
@property (readwrite) uint8_t startingIndex;
@@ -152,22 +151,11 @@ static NSString *MemLabelEndLink;
if (self.flagNameIndex == memFlagFree) {
self.memoryCardImages = @[];
self.hasImages = NO;
- self.englishName = self.sjisName = @"Free block";
+ self.name = @"Free block";
self.memID = self.memName = @"";
} else {
- self.englishName = @(infoBlock->Title);
- self.sjisName = [NSString stringWithCString:infoBlock->sTitle encoding:NSShiftJISStringEncoding];
-
- if ([englishName isEqualToString:sjisName]) {
-#if 0
- if (![englishName isEqualToString:@""])
- NSLog(@"English name and sjis name are the same: %@. Replacing the sjis string with the English string.", englishName);
-#endif
- self.sjisName = self.englishName;
- }
- @autoreleasepool {
- self.memoryCardImages = [PcsxrMemoryObject imagesFromMcd:infoBlock];
- }
+ self.name = [NSString stringWithCString:infoBlock->sTitle encoding:NSShiftJISStringEncoding];
+ self.memoryCardImages = [PcsxrMemoryObject imagesFromMcd:infoBlock];
if ([memImages count] == 0) {
self.hasImages = NO;
@@ -182,8 +170,7 @@ static NSString *MemLabelEndLink;
}
#pragma mark - Property Synthesizers
-@synthesize englishName;
-@synthesize sjisName;
+@synthesize name;
@synthesize memName;
@synthesize memID;
@synthesize memoryCardImages = memImages;
@@ -331,7 +318,7 @@ static inline void SetupAttrStr(NSMutableAttributedString *mutStr, NSColor *txtc
- (NSString *)description
{
- return [NSString stringWithFormat:@"%@ (%@): Name: %@ ID: %@, type: %@ start: %i size: %i", englishName, sjisName, memName, memID, self.flagName, startingIndex, blockSize];
+ return [NSString stringWithFormat:@"%@: Name: %@ ID: %@, type: %@ start: %i size: %i", name, memName, memID, self.flagName, startingIndex, blockSize];
}
@end