summaryrefslogtreecommitdiff
path: root/macosx/plugins
diff options
context:
space:
mode:
authorSND\MaddTheSane_cp <SND\MaddTheSane_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97>2013-08-30 00:18:10 +0000
committerSND\MaddTheSane_cp <SND\MaddTheSane_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97>2013-08-30 00:18:10 +0000
commitebafaceb5b5d75b102474ab49e7489fd68cb71d7 (patch)
tree6727f807d018732a7bac8c63f471a1bebc5dfe5a /macosx/plugins
parent460faedba401d0f1a754e8d3b9d4fd1c853d9413 (diff)
downloadpcsxr-ebafaceb5b5d75b102474ab49e7489fd68cb71d7.tar.gz
Preference changes in OS X plug-ins.
git-svn-id: https://pcsxr.svn.codeplex.com/svn/pcsxr@87024 e17a0e51-4ae3-4d35-97c3-1a29b211df97
Diffstat (limited to 'macosx/plugins')
-rwxr-xr-xmacosx/plugins/DFCdrom/macsrc/PluginConfigController.m2
-rwxr-xr-xmacosx/plugins/DFInput/macsrc/ControllerList.m74
-rwxr-xr-xmacosx/plugins/DFNet/macsrc/PluginConfigController.m2
-rwxr-xr-xmacosx/plugins/DFSound/macsrc/PluginController.m8
-rwxr-xr-xmacosx/plugins/DFXVideo/macsrc/PluginConfigController.m12
5 files changed, 52 insertions, 46 deletions
diff --git a/macosx/plugins/DFCdrom/macsrc/PluginConfigController.m b/macosx/plugins/DFCdrom/macsrc/PluginConfigController.m
index e36057c7..97249754 100755
--- a/macosx/plugins/DFCdrom/macsrc/PluginConfigController.m
+++ b/macosx/plugins/DFCdrom/macsrc/PluginConfigController.m
@@ -122,7 +122,7 @@ void ReadConfig()
NSMutableDictionary *writeDic = [NSMutableDictionary dictionaryWithDictionary:keyValues];
- [writeDic setObject:@((BOOL)[Cached intValue]) forKey:@"Threaded"];
+ [writeDic setObject:([Cached intValue] ? @YES : @NO) forKey:@"Threaded"];
[writeDic setObject:@([CacheSize intValue]) forKey:@"Cache Size"];
switch ([CdSpeed indexOfSelectedItem]) {
diff --git a/macosx/plugins/DFInput/macsrc/ControllerList.m b/macosx/plugins/DFInput/macsrc/ControllerList.m
index a3c934ac..01116c2d 100755
--- a/macosx/plugins/DFInput/macsrc/ControllerList.m
+++ b/macosx/plugins/DFInput/macsrc/ControllerList.m
@@ -28,41 +28,47 @@ static int currentController;
static NSArray *labelText;
@implementation ControllerList
+
++ (void)initialize
+{
+ if (!labelText) {
+ NSBundle *plugBundle = [NSBundle bundleForClass:[ControllerList class]];
+ labelText = @[[plugBundle localizedStringForKey:@"D-Pad Up" value:@"" table:nil],
+ [plugBundle localizedStringForKey:@"D-Pad Down" value:@"" table:nil],
+ [plugBundle localizedStringForKey:@"D-Pad Left" value:@"" table:nil],
+ [plugBundle localizedStringForKey:@"D-Pad Right" value:@"" table:nil],
+ [plugBundle localizedStringForKey:@"Cross" value:@"" table:nil],
+ [plugBundle localizedStringForKey:@"Circle" value:@"" table:nil],
+ [plugBundle localizedStringForKey:@"Square" value:@"" table:nil],
+ [plugBundle localizedStringForKey:@"Triangle" value:@"" table:nil],
+ [plugBundle localizedStringForKey:@"L1" value:@"" table:nil],
+ [plugBundle localizedStringForKey:@"R1" value:@"" table:nil],
+ [plugBundle localizedStringForKey:@"L2" value:@"" table:nil],
+ [plugBundle localizedStringForKey:@"R2" value:@"" table:nil],
+ [plugBundle localizedStringForKey:@"Select" value:@"" table:nil],
+ [plugBundle localizedStringForKey:@"Start" value:@"" table:nil],
+
+ [plugBundle localizedStringForKey:@"L3" value:@"" table:nil],
+ [plugBundle localizedStringForKey:@"R3" value:@"" table:nil],
+ [plugBundle localizedStringForKey:@"Analog" value:@"" table:nil],
+
+ [plugBundle localizedStringForKey:@"L-Stick Right" value:@"" table:nil],
+ [plugBundle localizedStringForKey:@"L-Stick Left" value:@"" table:nil],
+ [plugBundle localizedStringForKey:@"L-Stick Down" value:@"" table:nil],
+ [plugBundle localizedStringForKey:@"L-Stick Up" value:@"" table:nil],
+
+ [plugBundle localizedStringForKey:@"R-Stick Right" value:@"" table:nil],
+ [plugBundle localizedStringForKey:@"R-Stick Left" value:@"" table:nil],
+ [plugBundle localizedStringForKey:@"R-Stick Down" value:@"" table:nil],
+ [plugBundle localizedStringForKey:@"R-Stick Up" value:@"" table:nil]];
+ RETAINOBJ(labelText);
+ }
+}
+
- (id)initWithConfig
{
if (self = [super init]) {
- NSBundle *plugBundle = [NSBundle bundleForClass:[self class]];
- if (!labelText) {
- labelText = @[[plugBundle localizedStringForKey:@"D-Pad Up" value:@"" table:nil],
- [plugBundle localizedStringForKey:@"D-Pad Down" value:@"" table:nil],
- [plugBundle localizedStringForKey:@"D-Pad Left" value:@"" table:nil],
- [plugBundle localizedStringForKey:@"D-Pad Right" value:@"" table:nil],
- [plugBundle localizedStringForKey:@"Cross" value:@"" table:nil],
- [plugBundle localizedStringForKey:@"Circle" value:@"" table:nil],
- [plugBundle localizedStringForKey:@"Square" value:@"" table:nil],
- [plugBundle localizedStringForKey:@"Triangle" value:@"" table:nil],
- [plugBundle localizedStringForKey:@"L1" value:@"" table:nil],
- [plugBundle localizedStringForKey:@"R1" value:@"" table:nil],
- [plugBundle localizedStringForKey:@"L2" value:@"" table:nil],
- [plugBundle localizedStringForKey:@"R2" value:@"" table:nil],
- [plugBundle localizedStringForKey:@"Select" value:@"" table:nil],
- [plugBundle localizedStringForKey:@"Start" value:@"" table:nil],
-
- [plugBundle localizedStringForKey:@"L3" value:@"" table:nil],
- [plugBundle localizedStringForKey:@"R3" value:@"" table:nil],
- [plugBundle localizedStringForKey:@"Analog" value:@"" table:nil],
-
- [plugBundle localizedStringForKey:@"L-Stick Right" value:@"" table:nil],
- [plugBundle localizedStringForKey:@"L-Stick Left" value:@"" table:nil],
- [plugBundle localizedStringForKey:@"L-Stick Down" value:@"" table:nil],
- [plugBundle localizedStringForKey:@"L-Stick Up" value:@"" table:nil],
-
- [plugBundle localizedStringForKey:@"R-Stick Right" value:@"" table:nil],
- [plugBundle localizedStringForKey:@"R-Stick Left" value:@"" table:nil],
- [plugBundle localizedStringForKey:@"R-Stick Down" value:@"" table:nil],
- [plugBundle localizedStringForKey:@"R-Stick Up" value:@"" table:nil]];
- RETAINOBJ(labelText);
- }
+
}
return self;
}
@@ -120,11 +126,11 @@ static const int DPad[DKEY_TOTAL] = {
- (id)tableView:(NSTableView *)aTableView objectValueForTableColumn:(NSTableColumn *)aTableColumn
row:(NSInteger)rowIndex
{
- char buf[256] = {0};
-
if ([[aTableColumn identifier] isEqualToString:@"key"]) {
return [labelText objectAtIndex:rowIndex];
} else {
+ char buf[256] = {0};
+
// actual keys
if (rowIndex < DKEY_TOTAL) {
GetKeyDescription(buf, currentController, DPad[rowIndex]);
diff --git a/macosx/plugins/DFNet/macsrc/PluginConfigController.m b/macosx/plugins/DFNet/macsrc/PluginConfigController.m
index 155adf7e..ad186d6d 100755
--- a/macosx/plugins/DFNet/macsrc/PluginConfigController.m
+++ b/macosx/plugins/DFNet/macsrc/PluginConfigController.m
@@ -101,7 +101,7 @@ void ReadConfig()
[defaults registerDefaults:[NSDictionary dictionaryWithObjectsAndKeys:
[NSDictionary dictionaryWithObjectsAndKeys:
@"127.0.0.1", kIPADDRKEY,
- @((unsigned short)33306), kIPPORT,
+ @33306, kIPPORT,
@1, kPLAYERNUM,
nil], PrefsKey, nil]];
diff --git a/macosx/plugins/DFSound/macsrc/PluginController.m b/macosx/plugins/DFSound/macsrc/PluginController.m
index c03c4eaf..cc6b330a 100755
--- a/macosx/plugins/DFSound/macsrc/PluginController.m
+++ b/macosx/plugins/DFSound/macsrc/PluginController.m
@@ -148,10 +148,10 @@ void ReadConfig(void)
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
NSMutableDictionary *writeDic = [NSMutableDictionary dictionaryWithDictionary:self.keyValues];
- [writeDic setObject:@((BOOL)[hiCompBox intValue]) forKey:@"High Compatibility Mode"];
- [writeDic setObject:@((BOOL)[irqWaitBox intValue]) forKey:@"SPU IRQ Wait"];
- [writeDic setObject:@((BOOL)[monoSoundBox intValue]) forKey:@"Mono Sound Output"];
- [writeDic setObject:@((BOOL)[xaSpeedBox intValue]) forKey:@"XA Pitch"];
+ [writeDic setObject:([hiCompBox intValue] ? @YES : @NO) forKey:@"High Compatibility Mode"];
+ [writeDic setObject:([irqWaitBox intValue] ? @YES : @NO) forKey:@"SPU IRQ Wait"];
+ [writeDic setObject:([monoSoundBox intValue] ? @YES : @NO) forKey:@"Mono Sound Output"];
+ [writeDic setObject:([xaSpeedBox intValue] ? @YES : @NO) forKey:@"XA Pitch"];
[writeDic setObject:@([interpolValue intValue]) forKey:@"Interpolation Quality"];
[writeDic setObject:@([reverbValue intValue]) forKey:@"Reverb Quality"];
diff --git a/macosx/plugins/DFXVideo/macsrc/PluginConfigController.m b/macosx/plugins/DFXVideo/macsrc/PluginConfigController.m
index 36c91784..1410de88 100755
--- a/macosx/plugins/DFXVideo/macsrc/PluginConfigController.m
+++ b/macosx/plugins/DFXVideo/macsrc/PluginConfigController.m
@@ -202,13 +202,13 @@ void ReadConfig(void)
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
NSMutableDictionary *writeDic = [NSMutableDictionary dictionaryWithDictionary:keyValues];
- [writeDic setObject:@((BOOL)[fpsCounter intValue]) forKey:@"FPS Counter"];
- [writeDic setObject:@((BOOL)[autoFullScreen intValue]) forKey:@"Auto Full Screen"];
- [writeDic setObject:@((BOOL)[frameSkipping intValue]) forKey:@"Frame Skipping"];
+ [writeDic setObject:([fpsCounter intValue] ? @YES : @NO) forKey:@"FPS Counter"];
+ [writeDic setObject:([autoFullScreen intValue] ? @YES : @NO) forKey:@"Auto Full Screen"];
+ [writeDic setObject:([frameSkipping intValue] ? @YES : @NO) forKey:@"Frame Skipping"];
//[writeDic setObject:@([frameLimit intValue]) forKey:@"Frame Limit"];
- [writeDic setObject:@((BOOL)[vSync intValue]) forKey:@"VSync"];
- [writeDic setObject:@((BOOL)[hackEnable intValue]) forKey:@"Enable Hacks"];
- [writeDic setObject:@((BOOL)[shaders intValue]) forKey:@"UseShader"];
+ [writeDic setObject:([vSync intValue] ? @YES : @NO) forKey:@"VSync"];
+ [writeDic setObject:([hackEnable intValue] ? @YES : @NO) forKey:@"Enable Hacks"];
+ [writeDic setObject:([shaders intValue] ? @YES : @NO) forKey:@"UseShader"];
[writeDic setObject:@([shaderQualitySelector indexOfSelectedItem] + 1) forKey:@"ShaderQuality"];
[writeDic setObject:@([ditherMode indexOfSelectedItem]) forKey:@"Dither Mode"];