diff options
| author | SND\MaddTheSane_cp <SND\MaddTheSane_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97> | 2014-09-08 15:01:26 +0000 |
|---|---|---|
| committer | SND\MaddTheSane_cp <SND\MaddTheSane_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97> | 2014-09-08 15:01:26 +0000 |
| commit | 1ca710ff8f4c5535d638ea31d3aae98a7791f485 (patch) | |
| tree | bfa119868a049540e1f526a4404aa6a4eb38b3de /macosx/Source/PcsxrMemoryObject.m | |
| parent | b96092d6fbde83d1e3036a6591b0bed356526733 (diff) | |
| download | pcsxr-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/PcsxrMemoryObject.m')
| -rw-r--r-- | macosx/Source/PcsxrMemoryObject.m | 25 |
1 files changed, 6 insertions, 19 deletions
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 |
