diff options
| author | SND\MaddTheSane_cp <SND\MaddTheSane_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97> | 2014-11-10 19:46:07 +0000 |
|---|---|---|
| committer | SND\MaddTheSane_cp <SND\MaddTheSane_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97> | 2014-11-10 19:46:07 +0000 |
| commit | 0f8e66e194b903763b6c580599eb47c11f154bdd (patch) | |
| tree | 18210577c9696330348dee2711614374c64c56fa /macosx/Source | |
| parent | 264fac97c436e9df0c0e94daef463a1f0a17d3e8 (diff) | |
| download | pcsxr-0f8e66e194b903763b6c580599eb47c11f154bdd.tar.gz | |
OS X: Move away from ivars in headers, beginning with the main app.
Also have NSString properties be declared with copy, as recommended by Apple.
git-svn-id: https://pcsxr.svn.codeplex.com/svn/pcsxr@92226 e17a0e51-4ae3-4d35-97c3-1a29b211df97
Diffstat (limited to 'macosx/Source')
| -rw-r--r-- | macosx/Source/ConfigurationController.h | 26 | ||||
| -rw-r--r-- | macosx/Source/ConfigurationController.m | 9 | ||||
| -rw-r--r-- | macosx/Source/EmuThread.h | 1 | ||||
| -rw-r--r-- | macosx/Source/EmuThread.m | 3 | ||||
| -rw-r--r-- | macosx/Source/LaunchArg.h | 2 | ||||
| -rw-r--r-- | macosx/Source/LaunchArg.m | 2 | ||||
| -rw-r--r-- | macosx/Source/PcsxrController.h | 15 | ||||
| -rw-r--r-- | macosx/Source/PcsxrController.m | 12 | ||||
| -rw-r--r-- | macosx/Source/PcsxrMemCardArray.h | 11 | ||||
| -rw-r--r-- | macosx/Source/PcsxrMemCardController.h | 11 | ||||
| -rw-r--r-- | macosx/Source/PcsxrMemCardController.m | 4 | ||||
| -rw-r--r-- | macosx/Source/PcsxrMemoryObject.h | 6 | ||||
| -rw-r--r-- | macosx/Source/PcsxrMemoryObject.m | 6 | ||||
| -rw-r--r-- | macosx/Source/PcsxrPlugin.h | 2 | ||||
| -rw-r--r-- | macosx/Source/PcsxrPlugin.m | 4 |
15 files changed, 57 insertions, 57 deletions
diff --git a/macosx/Source/ConfigurationController.h b/macosx/Source/ConfigurationController.h index 4406a7a2..90dde217 100644 --- a/macosx/Source/ConfigurationController.h +++ b/macosx/Source/ConfigurationController.h @@ -11,20 +11,18 @@ extern NSString *const memCardChangeNumberKey; @class PcsxrMemCardController; @interface ConfigurationController : NSWindowController <NSWindowDelegate, NSTabViewDelegate> -{ - IBOutlet PluginController *cdromPlugin; - IBOutlet PluginController *graphicsPlugin; - IBOutlet PluginController *padPlugin; - IBOutlet PluginController *soundPlugin; - IBOutlet PluginController *netPlugin; - IBOutlet PluginController *sio1Plugin; - - IBOutlet PcsxrMemCardController *memCardEdit; - - // Hotkeys - IBOutlet HotkeyController *hkController; - IBOutlet NSTabViewItem *hkTab; -} +@property (weak) IBOutlet PluginController *cdromPlugin; +@property (weak) IBOutlet PluginController *graphicsPlugin; +@property (weak) IBOutlet PluginController *padPlugin; +@property (weak) IBOutlet PluginController *soundPlugin; +@property (weak) IBOutlet PluginController *netPlugin; +@property (weak) IBOutlet PluginController *sio1Plugin; + +@property (weak) IBOutlet PcsxrMemCardController *memCardEdit; + +// Hotkeys +@property (weak) IBOutlet HotkeyController *hkController; +@property (weak) IBOutlet NSTabViewItem *hkTab; @property (weak) IBOutlet NSButtonCell *noXaAudioCell; @property (weak) IBOutlet NSButtonCell *sioIrqAlwaysCell; diff --git a/macosx/Source/ConfigurationController.m b/macosx/Source/ConfigurationController.m index c2e65a4a..c7b63335 100644 --- a/macosx/Source/ConfigurationController.m +++ b/macosx/Source/ConfigurationController.m @@ -32,6 +32,15 @@ NSString *const memCardChangeNumberKey = @"PcsxrMemoryCardThatChangedKey"; @synthesize vSyncWAFixCell; @synthesize vTypePALCell; @synthesize widescreen; +@synthesize cdromPlugin; +@synthesize graphicsPlugin; +@synthesize padPlugin; +@synthesize soundPlugin; +@synthesize netPlugin; +@synthesize sio1Plugin; +@synthesize memCardEdit; +@synthesize hkController; +@synthesize hkTab; + (void)setMemoryCard:(NSInteger)theCard toURL:(NSURL *)theURL; { diff --git a/macosx/Source/EmuThread.h b/macosx/Source/EmuThread.h index bea572f3..33aa68e0 100644 --- a/macosx/Source/EmuThread.h +++ b/macosx/Source/EmuThread.h @@ -17,7 +17,6 @@ typedef NS_ENUM(char, EmuThreadPauseStatus) { @interface EmuThread : NSObject { jmp_buf restartJmp; - BOOL wasPaused; } - (void)EmuThreadRun:(id)anObject; diff --git a/macosx/Source/EmuThread.m b/macosx/Source/EmuThread.m index 3cc30294..7e3b961b 100644 --- a/macosx/Source/EmuThread.m +++ b/macosx/Source/EmuThread.m @@ -32,6 +32,9 @@ static pthread_cond_t eventCond; static pthread_mutex_t eventMutex; @implementation EmuThread +{ + BOOL wasPaused; +} - (void)setUpThread { diff --git a/macosx/Source/LaunchArg.h b/macosx/Source/LaunchArg.h index 6989c2e8..4733dcd7 100644 --- a/macosx/Source/LaunchArg.h +++ b/macosx/Source/LaunchArg.h @@ -17,7 +17,7 @@ typedef enum _LaunchArgOrder { @interface LaunchArg : NSObject @property (readonly) unsigned launchOrder; @property (readonly, copy, nonatomic) dispatch_block_t theBlock; -@property (readonly, strong) NSString *argument; +@property (readonly, copy) NSString *argument; - (instancetype)initWithLaunchOrder:(unsigned)order block:(dispatch_block_t)block argument:(NSString*)arg; - (instancetype)initWithLaunchOrder:(unsigned)order argument:(NSString*)arg block:(dispatch_block_t)block NS_DESIGNATED_INITIALIZER; diff --git a/macosx/Source/LaunchArg.m b/macosx/Source/LaunchArg.m index ecaddcb7..c09a876a 100644 --- a/macosx/Source/LaunchArg.m +++ b/macosx/Source/LaunchArg.m @@ -11,7 +11,7 @@ @interface LaunchArg () @property (readwrite) unsigned launchOrder; @property (readwrite, copy, nonatomic) dispatch_block_t theBlock; -@property (readwrite, strong) NSString *argument; +@property (readwrite, copy) NSString *argument; @end @implementation LaunchArg diff --git a/macosx/Source/PcsxrController.h b/macosx/Source/PcsxrController.h index b271ae55..1a3c6de1 100644 --- a/macosx/Source/PcsxrController.h +++ b/macosx/Source/PcsxrController.h @@ -12,21 +12,8 @@ __private_extern void ShowHelpAndExit(FILE* output, int exitCode); extern BOOL wasFinderLaunch; @interface PcsxrController : NSObject <NSApplicationDelegate> -{ - ConfigurationController *preferencesController; - CheatController *cheatController; - PluginList *pluginList; - - struct _PSXflags { - unsigned int sleepInBackground:1; - unsigned int wasPausedBeforeBGSwitch:1; - unsigned int endAtEmuClose:1; - unsigned int wasPausedBeforeDiscEject:1; - unsigned int reserved:28; - } PSXflags; -} @property (weak) IBOutlet RecentItemsMenu *recentItems; -@property (readonly) CheatController *cheatController; +@property (strong, readonly) CheatController *cheatController; @property (readonly) BOOL endAtEmuClose; - (IBAction)ejectCD:(id)sender; diff --git a/macosx/Source/PcsxrController.m b/macosx/Source/PcsxrController.m index 8760801f..64067c54 100644 --- a/macosx/Source/PcsxrController.m +++ b/macosx/Source/PcsxrController.m @@ -63,9 +63,21 @@ void ShowHelpAndExit(FILE* output, int exitCode) @property (strong) NSWindow *preferenceWindow; @property (strong) NSWindow *cheatWindow; @property (nonatomic) DASessionRef diskSession; +@property (strong, readwrite) CheatController *cheatController; @end @implementation PcsxrController +{ + ConfigurationController *preferencesController; + PluginList *pluginList; + struct _PSXflags { + unsigned int sleepInBackground:1; + unsigned int wasPausedBeforeBGSwitch:1; + unsigned int endAtEmuClose:1; + unsigned int wasPausedBeforeDiscEject:1; + unsigned int reserved:28; + } PSXflags; +} @synthesize recentItems; @synthesize skipFiles; @synthesize cheatController; diff --git a/macosx/Source/PcsxrMemCardArray.h b/macosx/Source/PcsxrMemCardArray.h index 584118b6..cfe830aa 100644 --- a/macosx/Source/PcsxrMemCardArray.h +++ b/macosx/Source/PcsxrMemCardArray.h @@ -16,18 +16,7 @@ - (void)deleteMemoryBlocksAtIndex:(int)slotnum; - (void)compactMemory; -/** - * @fn freeBlocks - * @abstract Blocks that are free from any data - * @result free blocks - */ @property (readonly) int freeBlocks; - -/** - * @fn availableBlocks - * @abstract Blocks that have been deleted - * @result free blocks - */ @property (readonly) int availableBlocks; - (int)memorySizeAtIndex:(int)idx; - (BOOL)moveBlockAtIndex:(int)idx toMemoryCard:(PcsxrMemCardArray*)otherCard; diff --git a/macosx/Source/PcsxrMemCardController.h b/macosx/Source/PcsxrMemCardController.h index d3b43aae..84ba4eeb 100644 --- a/macosx/Source/PcsxrMemCardController.h +++ b/macosx/Source/PcsxrMemCardController.h @@ -10,12 +10,11 @@ @class PcsxrMemCardArray; @interface PcsxrMemCardController : NSViewController -{ - IBOutlet NSCollectionView *memCard1view; - IBOutlet NSCollectionView *memCard2view; - IBOutlet NSTextField *memCard1Label; - IBOutlet NSTextField *memCard2Label; -} +@property (weak) IBOutlet NSCollectionView *memCard1view; +@property (weak) IBOutlet NSCollectionView *memCard2view; +@property (weak) IBOutlet NSTextField *memCard1Label; +@property (weak) IBOutlet NSTextField *memCard2Label; + @property (readonly, strong) PcsxrMemCardArray *memCard1Array; @property (readonly, strong) PcsxrMemCardArray *memCard2Array; diff --git a/macosx/Source/PcsxrMemCardController.m b/macosx/Source/PcsxrMemCardController.m index 1adf505b..a656dccb 100644 --- a/macosx/Source/PcsxrMemCardController.m +++ b/macosx/Source/PcsxrMemCardController.m @@ -23,6 +23,10 @@ @implementation PcsxrMemCardController @synthesize memCard1Array; @synthesize memCard2Array; +@synthesize memCard1view; +@synthesize memCard2view; +@synthesize memCard1Label; +@synthesize memCard2Label; - (void)setupValues:(int)theCards { diff --git a/macosx/Source/PcsxrMemoryObject.h b/macosx/Source/PcsxrMemoryObject.h index 80f63f57..6076fb68 100644 --- a/macosx/Source/PcsxrMemoryObject.h +++ b/macosx/Source/PcsxrMemoryObject.h @@ -28,9 +28,9 @@ typedef NS_ENUM(char, PCSXRMemFlags) { - (NSImage*)memoryImageAtIndex:(NSInteger)idx; -@property (readonly, strong) NSString *name; -@property (readonly, strong) NSString *memName; -@property (readonly, strong) NSString *memID; +@property (readonly, copy) NSString *name; +@property (readonly, copy) NSString *memName; +@property (readonly, copy) NSString *memID; @property (readonly, strong) NSArray *memoryCardImages; @property (readonly, strong, nonatomic) NSImage *memImage; @property (readonly) PCSXRMemFlags flagNameIndex; diff --git a/macosx/Source/PcsxrMemoryObject.m b/macosx/Source/PcsxrMemoryObject.m index 8ab320de..811aa37f 100644 --- a/macosx/Source/PcsxrMemoryObject.m +++ b/macosx/Source/PcsxrMemoryObject.m @@ -10,9 +10,9 @@ #import "PcsxrMemoryObject.h" @interface PcsxrMemoryObject () -@property (readwrite, strong) NSString *name; -@property (readwrite, strong) NSString *memName; -@property (readwrite, strong) NSString *memID; +@property (readwrite, copy) NSString *name; +@property (readwrite, copy) NSString *memName; +@property (readwrite, copy) NSString *memID; @property (readwrite) uint8_t startingIndex; @property (readwrite) uint8_t blockSize; diff --git a/macosx/Source/PcsxrPlugin.h b/macosx/Source/PcsxrPlugin.h index 2bace47b..8060866c 100644 --- a/macosx/Source/PcsxrPlugin.h +++ b/macosx/Source/PcsxrPlugin.h @@ -10,7 +10,7 @@ @interface PcsxrPlugin : NSObject @property (readonly, copy) NSString *path; -@property (readonly, strong) NSString *name; +@property (readonly, copy) NSString *name; @property (readonly) int type; + (NSString *)prefixForType:(int)type; diff --git a/macosx/Source/PcsxrPlugin.m b/macosx/Source/PcsxrPlugin.m index ae2be3cc..09e3eecf 100644 --- a/macosx/Source/PcsxrPlugin.m +++ b/macosx/Source/PcsxrPlugin.m @@ -17,9 +17,9 @@ @interface PcsxrPlugin () @property (readwrite, copy) NSString *path; -@property (readwrite, strong) NSString *name; +@property (readwrite, copy) NSString *name; @property (strong) NSDate *modDate; -@property (strong) NSString *fullPlugPath; +@property (copy) NSString *fullPlugPath; @property long version; @property (readwrite) int type; @property int active; |
