From 1ca710ff8f4c5535d638ea31d3aae98a7791f485 Mon Sep 17 00:00:00 2001 From: "SND\\MaddTheSane_cp" Date: Mon, 8 Sep 2014 15:01:26 +0000 Subject: 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 --- macosx/Source/PcsxrMemoryObject.m | 25 ++++++------------------- 1 file changed, 6 insertions(+), 19 deletions(-) (limited to 'macosx/Source/PcsxrMemoryObject.m') 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 -- cgit v1.2.3