diff options
| author | SND\MaddTheSane_cp <SND\MaddTheSane_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97> | 2013-08-30 02:17:17 +0000 |
|---|---|---|
| committer | SND\MaddTheSane_cp <SND\MaddTheSane_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97> | 2013-08-30 02:17:17 +0000 |
| commit | 6ddb90bd884bf64b2c24011460085ec186b4c6e7 (patch) | |
| tree | 9f5ccccda7384c67ab08518d8023fb1057325dff /macosx/plugins/DFInput/macsrc | |
| parent | ebafaceb5b5d75b102474ab49e7489fd68cb71d7 (diff) | |
| download | pcsxr-6ddb90bd884bf64b2c24011460085ec186b4c6e7.tar.gz | |
Better prefs managing on the main app.
Moving a few things around on the Mac side of the plug-ins.
git-svn-id: https://pcsxr.svn.codeplex.com/svn/pcsxr@87025 e17a0e51-4ae3-4d35-97c3-1a29b211df97
Diffstat (limited to 'macosx/plugins/DFInput/macsrc')
| -rwxr-xr-x | macosx/plugins/DFInput/macsrc/ControllerList.h | 4 | ||||
| -rwxr-xr-x | macosx/plugins/DFInput/macsrc/ControllerList.m | 80 | ||||
| -rwxr-xr-x | macosx/plugins/DFInput/macsrc/MappingCell.h | 3 | ||||
| -rwxr-xr-x | macosx/plugins/DFInput/macsrc/MappingCell.m | 2 | ||||
| -rwxr-xr-x | macosx/plugins/DFInput/macsrc/PadController.m | 1 | ||||
| -rwxr-xr-x | macosx/plugins/DFInput/macsrc/PadView.m | 2 | ||||
| -rw-r--r-- | macosx/plugins/DFInput/macsrc/cfgHelper.m | 2 |
7 files changed, 39 insertions, 55 deletions
diff --git a/macosx/plugins/DFInput/macsrc/ControllerList.h b/macosx/plugins/DFInput/macsrc/ControllerList.h index 6abdd3e8..aae13954 100755 --- a/macosx/plugins/DFInput/macsrc/ControllerList.h +++ b/macosx/plugins/DFInput/macsrc/ControllerList.h @@ -24,10 +24,8 @@ #import <Cocoa/Cocoa.h> #include "cfg.h" -@class KeyConfig; +@interface ControllerList : NSObject <NSTableViewDataSource> -@interface ControllerList : NSObject <NSTableViewDataSource> { -} - (id)initWithConfig; + (void)setCurrentController:(int)which; diff --git a/macosx/plugins/DFInput/macsrc/ControllerList.m b/macosx/plugins/DFInput/macsrc/ControllerList.m index 01116c2d..a88058bc 100755 --- a/macosx/plugins/DFInput/macsrc/ControllerList.m +++ b/macosx/plugins/DFInput/macsrc/ControllerList.m @@ -20,67 +20,55 @@ */ #import "ControllerList.h" +#import "ARCBridge.h" #include "pad.h" #include "cfg.h" -#import "ARCBridge.h" 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]) { - + static dispatch_once_t onceToken; + dispatch_once(&onceToken, ^{ + 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]]; + RETAINOBJNORETURN(labelText); + }); } return self; } -//#if !__has_feature(objc_arc) -#if 0 -- (void)dealloc -{ - [super dealloc]; -} -#endif - /* sets current controller data returned by data source */ + (void)setCurrentController:(int)which { diff --git a/macosx/plugins/DFInput/macsrc/MappingCell.h b/macosx/plugins/DFInput/macsrc/MappingCell.h index 2dc8cd49..58ebc7e1 100755 --- a/macosx/plugins/DFInput/macsrc/MappingCell.h +++ b/macosx/plugins/DFInput/macsrc/MappingCell.h @@ -23,7 +23,6 @@ #import <AppKit/AppKit.h> -@interface MappingCell : NSTextFieldCell { -} +@interface MappingCell : NSTextFieldCell @end diff --git a/macosx/plugins/DFInput/macsrc/MappingCell.m b/macosx/plugins/DFInput/macsrc/MappingCell.m index 885c1b74..a61e9087 100755 --- a/macosx/plugins/DFInput/macsrc/MappingCell.m +++ b/macosx/plugins/DFInput/macsrc/MappingCell.m @@ -21,7 +21,7 @@ #import "MappingCell.h" #import "ControllerList.h" -#import "cfg.h" +#include "cfg.h" @implementation MappingCell diff --git a/macosx/plugins/DFInput/macsrc/PadController.m b/macosx/plugins/DFInput/macsrc/PadController.m index 52342ea0..91f0baf0 100755 --- a/macosx/plugins/DFInput/macsrc/PadController.m +++ b/macosx/plugins/DFInput/macsrc/PadController.m @@ -23,7 +23,6 @@ #import "PadController.h" #import "ARCBridge.h" #include "pad.h" -#include <sys/param.h> static inline void RunOnMainThreadSync(dispatch_block_t block) { diff --git a/macosx/plugins/DFInput/macsrc/PadView.m b/macosx/plugins/DFInput/macsrc/PadView.m index dea3c2b6..7cafa4b1 100755 --- a/macosx/plugins/DFInput/macsrc/PadView.m +++ b/macosx/plugins/DFInput/macsrc/PadView.m @@ -20,8 +20,8 @@ */ #import "PadView.h" -#include "pad.h" #import "ARCBridge.h" +#include "pad.h" @implementation PadView diff --git a/macosx/plugins/DFInput/macsrc/cfgHelper.m b/macosx/plugins/DFInput/macsrc/cfgHelper.m index b51c5ee4..e15a9a1e 100644 --- a/macosx/plugins/DFInput/macsrc/cfgHelper.m +++ b/macosx/plugins/DFInput/macsrc/cfgHelper.m @@ -6,10 +6,10 @@ // // -#include "cfg.h" #import <Foundation/Foundation.h> #import "ARCBridge.h" #import "PadController.h" +#include "cfg.h" #define padType @"Pad Type" #define deviceNumber @"Device Number" |
