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
This commit is contained in:
parent
264fac97c4
commit
0f8e66e194
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
{
|
||||
|
|
|
@ -17,7 +17,6 @@ typedef NS_ENUM(char, EmuThreadPauseStatus) {
|
|||
|
||||
@interface EmuThread : NSObject {
|
||||
jmp_buf restartJmp;
|
||||
BOOL wasPaused;
|
||||
}
|
||||
|
||||
- (void)EmuThreadRun:(id)anObject;
|
||||
|
|
|
@ -32,6 +32,9 @@ static pthread_cond_t eventCond;
|
|||
static pthread_mutex_t eventMutex;
|
||||
|
||||
@implementation EmuThread
|
||||
{
|
||||
BOOL wasPaused;
|
||||
}
|
||||
|
||||
- (void)setUpThread
|
||||
{
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -23,6 +23,10 @@
|
|||
@implementation PcsxrMemCardController
|
||||
@synthesize memCard1Array;
|
||||
@synthesize memCard2Array;
|
||||
@synthesize memCard1view;
|
||||
@synthesize memCard2view;
|
||||
@synthesize memCard1Label;
|
||||
@synthesize memCard2Label;
|
||||
|
||||
- (void)setupValues:(int)theCards
|
||||
{
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue