summaryrefslogtreecommitdiff
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
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
-rw-r--r--macosx/Pcsxr-QL/GeneratePreviewForURL.m4
-rw-r--r--macosx/Resources/Base.lproj/Configuration.xib39
-rw-r--r--macosx/Resources/en.lproj/Localizable.strings2
-rw-r--r--macosx/Resources/fr.lproj/Localizable.strings4
-rw-r--r--macosx/Resources/hu.lproj/Localizable.strings4
-rw-r--r--macosx/Resources/zh-Hans.lproj/Localizable.strings2
-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
10 files changed, 30 insertions, 57 deletions
diff --git a/macosx/Pcsxr-QL/GeneratePreviewForURL.m b/macosx/Pcsxr-QL/GeneratePreviewForURL.m
index b4b61e3a..6238f911 100644
--- a/macosx/Pcsxr-QL/GeneratePreviewForURL.m
+++ b/macosx/Pcsxr-QL/GeneratePreviewForURL.m
@@ -118,7 +118,7 @@ static OSStatus GeneratePreviewForMemCard(void *thisInterface, QLPreviewRequestR
NSDictionary *imgProps = @{(NSString *)kQLPreviewPropertyAttachmentDataKey: pngData,
(NSString *)kQLPreviewPropertyMIMETypeKey: @"image/png"};
NSString *imgName = [[@(i++) stringValue] stringByAppendingPathExtension:@"png"];
- [htmlStr appendFormat:@"\t\t\t<tr><td><img src=\"cid:%@\"></td> <td>%@</td> <td>%i</td></tr>\n", imgName, obj.sjisName, obj.blockSize];
+ [htmlStr appendFormat:@"\t\t\t<tr><td><img src=\"cid:%@\"></td> <td>%@</td> <td>%i</td></tr>\n", imgName, obj.name, obj.blockSize];
htmlDict[imgName] = imgProps;
continue;
}
@@ -135,7 +135,7 @@ static OSStatus GeneratePreviewForMemCard(void *thisInterface, QLPreviewRequestR
NSDictionary *imgProps = @{(NSString *)kQLPreviewPropertyAttachmentDataKey: gifData,
(NSString *)kQLPreviewPropertyMIMETypeKey: @"image/gif"};
NSString *imgName = [[@(i++) stringValue] stringByAppendingPathExtension:@"gif"];
- [htmlStr appendFormat:@"\t\t\t<tr><td><img src=\"cid:%@\"></td> <td>%@</td> <td>%i</td></tr>\n", imgName, obj.sjisName, obj.blockSize];
+ [htmlStr appendFormat:@"\t\t\t<tr><td><img src=\"cid:%@\"></td> <td>%@</td> <td>%i</td></tr>\n", imgName, obj.name, obj.blockSize];
htmlDict[imgName] = imgProps;
}
diff --git a/macosx/Resources/Base.lproj/Configuration.xib b/macosx/Resources/Base.lproj/Configuration.xib
index 75798625..e6e9d7ea 100644
--- a/macosx/Resources/Base.lproj/Configuration.xib
+++ b/macosx/Resources/Base.lproj/Configuration.xib
@@ -1147,17 +1147,17 @@
</connections>
</window>
<view id="957" userLabel="MemCardObjectView">
- <rect key="frame" x="0.0" y="0.0" width="180" height="132"/>
+ <rect key="frame" x="0.0" y="0.0" width="180" height="107"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<box autoresizesSubviews="NO" title="Box" boxType="custom" borderType="none" titlePosition="noTitle" translatesAutoresizingMaskIntoConstraints="NO" id="965">
- <rect key="frame" x="0.0" y="0.0" width="180" height="132"/>
+ <rect key="frame" x="0.0" y="0.0" width="180" height="107"/>
<view key="contentView">
- <rect key="frame" x="0.0" y="0.0" width="180" height="132"/>
+ <rect key="frame" x="0.0" y="0.0" width="180" height="107"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<imageView translatesAutoresizingMaskIntoConstraints="NO" id="976">
- <rect key="frame" x="66" y="80" width="48" height="48"/>
+ <rect key="frame" x="66" y="55" width="48" height="48"/>
<constraints>
<constraint firstAttribute="width" constant="48" id="kIh-n8-gJw"/>
<constraint firstAttribute="height" constant="48" id="vPq-qO-hYs"/>
@@ -1168,29 +1168,21 @@
</connections>
</imageView>
<textField verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="979">
- <rect key="frame" x="1" y="55" width="178" height="17"/>
- <textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" alignment="center" title="English name" id="981">
- <font key="font" metaFont="system"/>
- <color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
- <color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
- </textFieldCell>
- <connections>
- <binding destination="958" name="value" keyPath="representedObject.englishName" id="989"/>
- </connections>
- </textField>
- <textField verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="978">
<rect key="frame" x="1" y="30" width="178" height="17"/>
- <textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" alignment="center" title="SJIS name" id="982">
+ <constraints>
+ <constraint firstAttribute="width" constant="174" id="wts-Vd-Pke"/>
+ </constraints>
+ <textFieldCell key="cell" lineBreakMode="truncatingTail" sendsActionOnEndEditing="YES" alignment="center" title="English name" id="981">
<font key="font" metaFont="system"/>
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
<connections>
- <binding destination="958" name="value" keyPath="representedObject.sjisName" id="990"/>
+ <binding destination="958" name="value" keyPath="representedObject.name" id="Zcl-K6-pvX"/>
</connections>
</textField>
<textField verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="977">
- <rect key="frame" x="1" y="8" width="178" height="14"/>
+ <rect key="frame" x="63" y="8" width="55" height="14"/>
<textFieldCell key="cell" controlSize="small" lineBreakMode="truncatingMiddle" allowsUndo="NO" sendsActionOnEndEditing="YES" alignment="center" title="DELETED" allowsEditingTextAttributes="YES" id="983">
<font key="font" metaFont="smallSystem"/>
<color key="textColor" name="textColor" catalog="System" colorSpace="catalog"/>
@@ -1201,7 +1193,7 @@
</connections>
</textField>
<customView focusRingType="none" translatesAutoresizingMaskIntoConstraints="NO" id="1021" customClass="MemBadgeView">
- <rect key="frame" x="90" y="104" width="24" height="24"/>
+ <rect key="frame" x="90" y="79" width="24" height="24"/>
<subviews>
<textField verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="1047">
<rect key="frame" x="-2" y="7" width="28" height="11"/>
@@ -1237,21 +1229,16 @@
</subviews>
</view>
<constraints>
- <constraint firstItem="977" firstAttribute="top" secondItem="978" secondAttribute="bottom" constant="8" symbolic="YES" id="7YC-M7-vn3"/>
<constraint firstAttribute="centerX" secondItem="976" secondAttribute="centerX" id="BqN-QU-plG"/>
<constraint firstAttribute="centerX" secondItem="979" secondAttribute="centerX" id="Dmf-If-mue"/>
- <constraint firstItem="978" firstAttribute="width" secondItem="977" secondAttribute="width" id="OLg-PY-KOQ"/>
<constraint firstItem="976" firstAttribute="trailing" secondItem="1021" secondAttribute="trailing" id="SW5-1f-7rd"/>
<constraint firstItem="976" firstAttribute="top" secondItem="1021" secondAttribute="top" id="Scn-jG-PGU"/>
<constraint firstAttribute="bottom" secondItem="977" secondAttribute="bottom" constant="8" id="WpJ-zn-ZXZ"/>
+ <constraint firstItem="977" firstAttribute="top" secondItem="979" secondAttribute="bottom" constant="8" symbolic="YES" id="a7X-wp-e0G"/>
<constraint firstItem="979" firstAttribute="top" secondItem="976" secondAttribute="bottom" constant="8" symbolic="YES" id="glW-gx-yMC"/>
<constraint firstItem="976" firstAttribute="top" secondItem="965" secondAttribute="top" constant="4" id="lCY-pF-WD1"/>
- <constraint firstItem="978" firstAttribute="width" secondItem="979" secondAttribute="width" id="nh9-91-rTJ"/>
- <constraint firstItem="978" firstAttribute="leading" secondItem="965" secondAttribute="leading" constant="3" id="rfy-JA-Rzu"/>
- <constraint firstAttribute="trailing" secondItem="978" secondAttribute="trailing" constant="3" id="vOS-Qk-paU"/>
+ <constraint firstItem="979" firstAttribute="leading" secondItem="965" secondAttribute="leading" constant="3" id="psC-ra-j1g"/>
<constraint firstAttribute="centerX" secondItem="977" secondAttribute="centerX" id="wB2-dm-nDi"/>
- <constraint firstAttribute="centerX" secondItem="978" secondAttribute="centerX" id="yEW-fK-6C2"/>
- <constraint firstItem="978" firstAttribute="top" secondItem="979" secondAttribute="bottom" constant="8" symbolic="YES" id="yIl-84-XQn"/>
</constraints>
<color key="borderColor" white="0.0" alpha="0.41999999999999998" colorSpace="calibratedWhite"/>
<color key="fillColor" name="selectedControlColor" catalog="System" colorSpace="catalog"/>
diff --git a/macosx/Resources/en.lproj/Localizable.strings b/macosx/Resources/en.lproj/Localizable.strings
index af3d0e8d..8937f85e 100644
--- a/macosx/Resources/en.lproj/Localizable.strings
+++ b/macosx/Resources/en.lproj/Localizable.strings
@@ -87,7 +87,7 @@
"Deleting a block will remove all saved data on that block.\n\nThis cannot be undone." = "Deleting a memory card object will set the blocks to not be readable by the emulator, and may result in the data being overwritten in the future.";
"No Free Space" = "No Free Space";
"Memory card %d doesn't have %d free consecutive blocks on it. Please remove some blocks on that card to continue" = "Memory card %1$d doesn't have %2$d free consecutive blocks on it. Please remove some blocks on that card to continue.";
-"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?" = "Memory card %1$i does not have enough free consecutive blocks.\n\nIn order to copy over “%2$@ (%3$@),” memory card %4$i must be compressed. Compressing memory cards will make deleted blocks unrecoverable.\n\nDo you want to continue?";
+"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?" = "Memory card %1$i does not have enough free consecutive blocks.\n\nIn order to copy over “%2$@,” memory card %3$i must be compressed. Compressing memory cards will make deleted blocks unrecoverable.\n\nDo you want to continue?";
//Cheat manager
"Save Cheats" = "Save Cheats";
diff --git a/macosx/Resources/fr.lproj/Localizable.strings b/macosx/Resources/fr.lproj/Localizable.strings
index 15bbc906..945cd05c 100644
--- a/macosx/Resources/fr.lproj/Localizable.strings
+++ b/macosx/Resources/fr.lproj/Localizable.strings
@@ -1,4 +1,4 @@
-/*
+/*
Localizable.strings
Pcsx
@@ -89,7 +89,7 @@
//"Deleting a block will remove all saved data on that block.\n\nThis cannot be undone." = "Deleting a memory card object will set the blocks to not be readable by the emulator, and may result in the data being overwritten in the future.";
"No Free Space" = "Pas d'emplacement libre sur la carte mémoire"; //Trim this down
//"Memory card %d doesn't have %d free consecutive blocks on it. Please remove some blocks on that card to continue" = "Memory card %1$d doesn't have %2$d free consecutive blocks on it. Please remove some blocks on that card to continue.";
-//"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?" = "Memory card %1$i does not have enough free consecutive blocks.\n\nIn order to copy over \"%2$@ (%3$@),\" memory card %4$i must be compressed. Compressing memory cards will make deleted blocks unrecoverable.\n\nDo you want to continue?";
+//"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?" = "Memory card %1$i does not have enough free consecutive blocks.\n\nIn order to copy over “%2$@,” memory card %3$i must be compressed. Compressing memory cards will make deleted blocks unrecoverable.\n\nDo you want to continue?";
//Cheat manager
//"Save Cheats" = "Save Cheats";
diff --git a/macosx/Resources/hu.lproj/Localizable.strings b/macosx/Resources/hu.lproj/Localizable.strings
index e88aa559..77f7bba9 100644
--- a/macosx/Resources/hu.lproj/Localizable.strings
+++ b/macosx/Resources/hu.lproj/Localizable.strings
@@ -1,4 +1,4 @@
-/*
+/*
Localizable.strings
Pcsx
@@ -89,7 +89,7 @@
//"Deleting a block will remove all saved data on that block.\n\nThis cannot be undone." = "Deleting a memory card object will set the blocks to not be readable by the emulator, and may result in the data being overwritten in the future.";
"No Free Space" = "Nincs szabad hely a memória kártyán";
//"Memory card %d doesn't have %d free consecutive blocks on it. Please remove some blocks on that card to continue" = "Memory card %1$d doesn't have %2$d free consecutive blocks on it. Please remove some blocks on that card to continue.";
-//"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?" = "Memory card %1$i does not have enough free consecutive blocks.\n\nIn order to copy over \"%2$@ (%3$@),\" memory card %4$i must be compressed. Compressing memory cards will make deleted blocks unrecoverable.\n\nDo you want to continue?";
+//"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?" = "Memory card %1$i does not have enough free consecutive blocks.\n\nIn order to copy over “%2$@,” memory card %3$i must be compressed. Compressing memory cards will make deleted blocks unrecoverable.\n\nDo you want to continue?";
//Cheat manager
//"Save Cheats" = "Save Cheats";
diff --git a/macosx/Resources/zh-Hans.lproj/Localizable.strings b/macosx/Resources/zh-Hans.lproj/Localizable.strings
index beea96da..871ef102 100644
--- a/macosx/Resources/zh-Hans.lproj/Localizable.strings
+++ b/macosx/Resources/zh-Hans.lproj/Localizable.strings
@@ -89,7 +89,7 @@
"Deleting a block will remove all saved data on that block.\n\nThis cannot be undone." = "删除后在模拟器里将不能呢个读取这个存档.";
"No Free Space" = "没有可用空间";
"Memory card %d doesn't have %d free consecutive blocks on it. Please remove some blocks on that card to continue" = "记忆卡 %1$d 没有 %2$d 个可用存储位置.请移除一些存档.";
-"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?" = "记忆卡 %1$i 没有足够的空间.\n\nIn 复制结束 “%2$@ (%3$@),” 记忆卡 %4$i 必须压缩. 压缩记忆卡将删除存档且不可回复.\n\n要继续吗?";
+"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?" = "记忆卡 %1$i 没有足够的空间.\n\nIn 复制结束 “%2$@,” 记忆卡 %3$i 必须压缩. 压缩记忆卡将删除存档且不可回复.\n\n要继续吗?";
//Cheat manager
"Save Cheats" = "存储金手指";
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