OS X: Modernize the Cocoa code using Xcode 6.
git-svn-id: https://pcsxr.svn.codeplex.com/svn/pcsxr@91019 e17a0e51-4ae3-4d35-97c3-1a29b211df97
This commit is contained in:
parent
50630078a5
commit
0a350e0957
|
@ -10,3 +10,7 @@
|
|||
#import <Cocoa/Cocoa.h>
|
||||
#import "PcsxrMemoryObject.h"
|
||||
#endif
|
||||
|
||||
#ifndef NS_DESIGNATED_INITIALIZER
|
||||
#define NS_DESIGNATED_INITIALIZER
|
||||
#endif
|
||||
|
|
|
@ -167,8 +167,6 @@
|
|||
551A779917869F610052D185 /* PeopsSpuAL.psxplugin in Copy Plug-Ins */ = {isa = PBXBuildFile; fileRef = 551A771F178698C60052D185 /* PeopsSpuAL.psxplugin */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; };
|
||||
551A779A17869F610052D185 /* PeopsXGL.psxplugin in Copy Plug-Ins */ = {isa = PBXBuildFile; fileRef = 551A774F17869C280052D185 /* PeopsXGL.psxplugin */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; };
|
||||
551A779B17869F610052D185 /* DFNet.psxplugin in Copy Plug-Ins */ = {isa = PBXBuildFile; fileRef = 551A776D17869E430052D185 /* DFNet.psxplugin */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; };
|
||||
551A779E17869FC70052D185 /* libSPUSharedCode.dylib in Copy Frameworks */ = {isa = PBXBuildFile; fileRef = 551A76E71786971B0052D185 /* libSPUSharedCode.dylib */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; };
|
||||
551A77A017869FED0052D185 /* libSPUSharedCode.dylib in Copy Frameworks */ = {isa = PBXBuildFile; fileRef = 551A76E71786971B0052D185 /* libSPUSharedCode.dylib */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; };
|
||||
551A77E71786A4DD0052D185 /* Carbon.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 551A76AC178693C60052D185 /* Carbon.framework */; };
|
||||
5525BC5E19421A760018AF2F /* CoreServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 551A76AF178693D60052D185 /* CoreServices.framework */; };
|
||||
5525BC5F19421A760018AF2F /* CoreFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 551A76B2178693EA0052D185 /* CoreFoundation.framework */; };
|
||||
|
@ -189,13 +187,13 @@
|
|||
553FECF818DF5A8300C7B007 /* KeyNames.plist in Resources */ = {isa = PBXBuildFile; fileRef = 553FECCC18DF5A8300C7B007 /* KeyNames.plist */; };
|
||||
553FECF918DF5A8300C7B007 /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = 553FECCE18DF5A8300C7B007 /* Localizable.strings */; };
|
||||
554FD70917C6A13E0056CF66 /* SDL2.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 554FD70817C6A13E0056CF66 /* SDL2.framework */; };
|
||||
554FD70A17C6A14B0056CF66 /* SDL2.framework in Copy Frameworks */ = {isa = PBXBuildFile; fileRef = 554FD70817C6A13E0056CF66 /* SDL2.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; };
|
||||
554FD70B17C6A1EF0056CF66 /* SDL2.framework in Copy Frameworks */ = {isa = PBXBuildFile; fileRef = 554FD70817C6A13E0056CF66 /* SDL2.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; };
|
||||
554FD70C17C6A1F10056CF66 /* SDL2.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 554FD70817C6A13E0056CF66 /* SDL2.framework */; };
|
||||
55534AF518183BFB006D6BCB /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 55534AF418183BFB006D6BCB /* main.m */; };
|
||||
5557769A17EBE7D60019D008 /* Media.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 5557769917EBE7D60019D008 /* Media.xcassets */; };
|
||||
556C37A9197C815C001A4265 /* PSXMemEnumerator.m in Sources */ = {isa = PBXBuildFile; fileRef = 556C37A8197C815C001A4265 /* PSXMemEnumerator.m */; };
|
||||
556C37AB197C9C59001A4265 /* PcsxrMemoryObject.m in Sources */ = {isa = PBXBuildFile; fileRef = 55A90228147D89380037E18F /* PcsxrMemoryObject.m */; };
|
||||
556C37AD197D94C8001A4265 /* SDL2.framework in Copy Frameworks */ = {isa = PBXBuildFile; fileRef = 554FD70817C6A13E0056CF66 /* SDL2.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; };
|
||||
556C37AE197D94D6001A4265 /* libSPUSharedCode.dylib in Copy Frameworks */ = {isa = PBXBuildFile; fileRef = 551A76E71786971B0052D185 /* libSPUSharedCode.dylib */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; };
|
||||
5581463917AABCD100862DBF /* PcsxrCheatHandler.m in Sources */ = {isa = PBXBuildFile; fileRef = 5581463817AABCD100862DBF /* PcsxrCheatHandler.m */; };
|
||||
559366CA12B694DF004ACC1E /* iR3000A-64.c in Sources */ = {isa = PBXBuildFile; fileRef = 559366C112B694DF004ACC1E /* iR3000A-64.c */; };
|
||||
559366CB12B694DF004ACC1E /* ix86-64.c in Sources */ = {isa = PBXBuildFile; fileRef = 559366C212B694DF004ACC1E /* ix86-64.c */; };
|
||||
|
@ -366,40 +364,6 @@
|
|||
/* End PBXContainerItemProxy section */
|
||||
|
||||
/* Begin PBXCopyFilesBuildPhase section */
|
||||
551A779C17869FB10052D185 /* Copy Frameworks */ = {
|
||||
isa = PBXCopyFilesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
dstPath = "";
|
||||
dstSubfolderSpec = 10;
|
||||
files = (
|
||||
551A779E17869FC70052D185 /* libSPUSharedCode.dylib in Copy Frameworks */,
|
||||
554FD70A17C6A14B0056CF66 /* SDL2.framework in Copy Frameworks */,
|
||||
);
|
||||
name = "Copy Frameworks";
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
551A779F17869FD60052D185 /* Copy Frameworks */ = {
|
||||
isa = PBXCopyFilesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
dstPath = "";
|
||||
dstSubfolderSpec = 10;
|
||||
files = (
|
||||
551A77A017869FED0052D185 /* libSPUSharedCode.dylib in Copy Frameworks */,
|
||||
);
|
||||
name = "Copy Frameworks";
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
551A77BA1786A1DC0052D185 /* Copy Frameworks */ = {
|
||||
isa = PBXCopyFilesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
dstPath = "";
|
||||
dstSubfolderSpec = 10;
|
||||
files = (
|
||||
554FD70B17C6A1EF0056CF66 /* SDL2.framework in Copy Frameworks */,
|
||||
);
|
||||
name = "Copy Frameworks";
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
55202EBA18E73E3E00C631AA /* Copy QuickLook Plug-In */ = {
|
||||
isa = PBXCopyFilesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
|
@ -422,6 +386,18 @@
|
|||
name = "Copy Spotlight Plug-Ins";
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
556C37AC197D94AF001A4265 /* Copy Frameworks */ = {
|
||||
isa = PBXCopyFilesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
dstPath = "";
|
||||
dstSubfolderSpec = 10;
|
||||
files = (
|
||||
556C37AE197D94D6001A4265 /* libSPUSharedCode.dylib in Copy Frameworks */,
|
||||
556C37AD197D94C8001A4265 /* SDL2.framework in Copy Frameworks */,
|
||||
);
|
||||
name = "Copy Frameworks";
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
71AD2DF010C3573400365243 /* Copy Plug-Ins */ = {
|
||||
isa = PBXCopyFilesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
|
@ -1825,6 +1801,7 @@
|
|||
55202EBA18E73E3E00C631AA /* Copy QuickLook Plug-In */,
|
||||
5525BC58194219B80018AF2F /* Copy Spotlight Plug-Ins */,
|
||||
55F41A3317EF8CFF00605DF8 /* Strip Headers */,
|
||||
556C37AC197D94AF001A4265 /* Copy Frameworks */,
|
||||
);
|
||||
buildRules = (
|
||||
2BD707B705559AE300CB5D9B /* PBXBuildRule */,
|
||||
|
@ -1909,7 +1886,6 @@
|
|||
551A76871786919F0052D185 /* Sources */,
|
||||
551A76881786919F0052D185 /* Frameworks */,
|
||||
551A768A1786919F0052D185 /* Resources */,
|
||||
551A77BA1786A1DC0052D185 /* Copy Frameworks */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
|
@ -1944,7 +1920,6 @@
|
|||
551A76DB178696BD0052D185 /* Sources */,
|
||||
551A76DC178696BD0052D185 /* Frameworks */,
|
||||
551A76DE178696BD0052D185 /* Resources */,
|
||||
551A779C17869FB10052D185 /* Copy Frameworks */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
|
@ -1980,7 +1955,6 @@
|
|||
551A7709178698C60052D185 /* Sources */,
|
||||
551A7714178698C60052D185 /* Frameworks */,
|
||||
551A7717178698C60052D185 /* Resources */,
|
||||
551A779F17869FD60052D185 /* Copy Frameworks */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
|
@ -3559,6 +3533,7 @@
|
|||
);
|
||||
GCC_WARN_UNKNOWN_PRAGMAS = NO;
|
||||
INFOPLIST_FILE = Info.plistvers.plist;
|
||||
LD_RUNPATH_SEARCH_PATHS = "@loader_path/../Frameworks @executable_path/../Frameworks";
|
||||
OTHER_CFLAGS = "$(inherited)";
|
||||
PRODUCT_NAME = PCSXR;
|
||||
SKIP_INSTALL = NO;
|
||||
|
@ -3734,6 +3709,7 @@
|
|||
);
|
||||
GCC_WARN_UNKNOWN_PRAGMAS = NO;
|
||||
INFOPLIST_FILE = Info.plist;
|
||||
LD_RUNPATH_SEARCH_PATHS = "@loader_path/../Frameworks @executable_path/../Frameworks";
|
||||
OTHER_CFLAGS = "$(inherited)";
|
||||
PRODUCT_NAME = PCSXR;
|
||||
SKIP_INSTALL = NO;
|
||||
|
@ -3758,6 +3734,7 @@
|
|||
);
|
||||
GCC_WARN_UNKNOWN_PRAGMAS = NO;
|
||||
INFOPLIST_FILE = Info.plistvers.plist;
|
||||
LD_RUNPATH_SEARCH_PATHS = "@loader_path/../Frameworks @executable_path/../Frameworks";
|
||||
OTHER_CFLAGS = (
|
||||
"-fomit-frame-pointer",
|
||||
"$(inherited)",
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
@property (readwrite) uint32_t cheatAddress;
|
||||
@property (readwrite) uint16_t cheatValue;
|
||||
|
||||
- (instancetype)initWithAddress:(uint32_t)add value:(uint16_t)val;
|
||||
- (instancetype)initWithAddress:(uint32_t)add value:(uint16_t)val NS_DESIGNATED_INITIALIZER;
|
||||
- (instancetype)initWithCheatCode:(CheatCode *)theCheat;
|
||||
@end
|
||||
|
||||
|
@ -21,7 +21,7 @@
|
|||
@property (readwrite, strong) NSString *cheatName;
|
||||
@property (readwrite, getter = isEnabled) BOOL enabled;
|
||||
|
||||
- (instancetype)initWithCheat:(Cheat *)theCheat;
|
||||
- (instancetype)initWithCheat:(Cheat *)theCheat NS_DESIGNATED_INITIALIZER;
|
||||
@end
|
||||
|
||||
@interface CheatController : NSWindowController <NSWindowDelegate, NSTableViewDelegate>
|
||||
|
|
|
@ -19,7 +19,7 @@ typedef enum _LaunchArgOrder {
|
|||
@property (readonly, copy, nonatomic) dispatch_block_t theBlock;
|
||||
@property (readonly, strong) NSString *argument;
|
||||
|
||||
- (id)initWithLaunchOrder:(unsigned)order block:(dispatch_block_t)block argument:(NSString*)arg;
|
||||
- (id)initWithLaunchOrder:(unsigned)order argument:(NSString*)arg block:(dispatch_block_t)block;
|
||||
- (instancetype)initWithLaunchOrder:(unsigned)order block:(dispatch_block_t)block argument:(NSString*)arg NS_DESIGNATED_INITIALIZER;
|
||||
- (instancetype)initWithLaunchOrder:(unsigned)order argument:(NSString*)arg block:(dispatch_block_t)block;
|
||||
- (void)addToDictionary:(NSMutableDictionary*)toAdd;
|
||||
@end
|
||||
|
|
|
@ -23,12 +23,12 @@
|
|||
_theBlock = [theBlock copy];
|
||||
}
|
||||
|
||||
- (id)initWithLaunchOrder:(unsigned)order argument:(NSString*)arg block:(dispatch_block_t)block
|
||||
- (instancetype)initWithLaunchOrder:(unsigned)order argument:(NSString*)arg block:(dispatch_block_t)block
|
||||
{
|
||||
return [self initWithLaunchOrder:order block:block argument:arg];
|
||||
}
|
||||
|
||||
- (id)initWithLaunchOrder:(unsigned)order block:(dispatch_block_t)block argument:(NSString*)arg
|
||||
- (instancetype)initWithLaunchOrder:(unsigned)order block:(dispatch_block_t)block argument:(NSString*)arg
|
||||
{
|
||||
if (self = [super init]) {
|
||||
self.launchOrder = order;
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
@implementation MemBadgeView
|
||||
|
||||
//TODO: also include the memory count in the view as well.
|
||||
- (id)initWithFrame:(NSRect)frame
|
||||
- (instancetype)initWithFrame:(NSRect)frame
|
||||
{
|
||||
self = [super initWithFrame:frame];
|
||||
if (self) {
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
self.hexFormatString = [NSString stringWithFormat:@"0x%%0%ilx", hexPadding];
|
||||
}
|
||||
|
||||
- (id)init
|
||||
- (instancetype)init
|
||||
{
|
||||
if (self = [super init]) {
|
||||
#ifdef __LP64__
|
||||
|
@ -34,7 +34,7 @@
|
|||
return self;
|
||||
}
|
||||
|
||||
- (id)initWithCoder:(NSCoder *)aDecoder
|
||||
- (instancetype)initWithCoder:(NSCoder *)aDecoder
|
||||
{
|
||||
if (self = [super initWithCoder:aDecoder]) {
|
||||
#ifdef __LP64__
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
|
||||
@interface PcsxrMemCardArray : NSObject
|
||||
|
||||
- (id)initWithMemoryCardNumber:(int)carNum;
|
||||
- (instancetype)initWithMemoryCardNumber:(int)carNum NS_DESIGNATED_INITIALIZER;
|
||||
|
||||
- (void)deleteMemoryBlocksAtIndex:(int)slotnum;
|
||||
- (void)compactMemory;
|
||||
|
@ -21,14 +21,14 @@
|
|||
* @abstract Blocks that are free from any data
|
||||
* @result free blocks
|
||||
*/
|
||||
- (int)freeBlocks;
|
||||
@property (readonly) int freeBlocks;
|
||||
|
||||
/**
|
||||
* @fn availableBlocks
|
||||
* @abstract Blocks that have been deleted
|
||||
* @result free blocks
|
||||
*/
|
||||
- (int)availableBlocks;
|
||||
@property (readonly) int availableBlocks;
|
||||
- (int)memorySizeAtIndex:(int)idx;
|
||||
- (BOOL)moveBlockAtIndex:(int)idx toMemoryCard:(PcsxrMemCardArray*)otherCard;
|
||||
- (int)indexOfFreeBlocksWithSize:(int)asize;
|
||||
|
|
|
@ -91,7 +91,7 @@ static inline void ClearMemcardData(char *to, int dsti, char *str)
|
|||
}
|
||||
}
|
||||
|
||||
- (id)initWithMemoryCardNumber:(int)carNum
|
||||
- (instancetype)initWithMemoryCardNumber:(int)carNum
|
||||
{
|
||||
NSParameterAssert(carNum == 1 || carNum == 2);
|
||||
if (self = [super init]) {
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
return utisupport;
|
||||
}
|
||||
|
||||
- (id)initWithWindow:(NSWindow *)window
|
||||
- (instancetype)initWithWindow:(NSWindow *)window
|
||||
{
|
||||
self = [super initWithWindow:window];
|
||||
if (self) {
|
||||
|
@ -37,7 +37,7 @@
|
|||
return self;
|
||||
}
|
||||
|
||||
- (id)init
|
||||
- (instancetype)init
|
||||
{
|
||||
return self = [self initWithWindowNibName:@"PcsxrMemCard"];
|
||||
}
|
||||
|
|
|
@ -26,7 +26,7 @@ typedef NS_ENUM(char, PCSXRMemFlags) {
|
|||
+ (NSImage *)blankImage;
|
||||
+ (PCSXRMemFlags)memFlagsFromBlockFlags:(unsigned char)blockFlags;
|
||||
|
||||
- (id)initWithMcdBlock:(McdBlock *)infoBlockc startingIndex:(uint8_t)startIdx size:(uint8_t)memSize;
|
||||
- (instancetype)initWithMcdBlock:(McdBlock *)infoBlockc startingIndex:(uint8_t)startIdx size:(uint8_t)memSize NS_DESIGNATED_INITIALIZER;
|
||||
|
||||
@property (readonly, strong) NSString *englishName;
|
||||
@property (readonly, strong) NSString *sjisName;
|
||||
|
|
|
@ -136,7 +136,7 @@ static NSString *MemLabelEndLink;
|
|||
return memFlagFree;
|
||||
}
|
||||
|
||||
- (id)initWithMcdBlock:(McdBlock *)infoBlock startingIndex:(uint8_t)startIdx size:(uint8_t)memSize
|
||||
- (instancetype)initWithMcdBlock:(McdBlock *)infoBlock startingIndex:(uint8_t)startIdx size:(uint8_t)memSize
|
||||
{
|
||||
if (self = [super init]) {
|
||||
self.startingIndex = startIdx;
|
||||
|
|
|
@ -18,15 +18,15 @@
|
|||
+ (char **)configEntriesForType:(int)type;
|
||||
+ (NSArray *)pluginsPaths;
|
||||
|
||||
- (id)initWithPath:(NSString *)aPath;
|
||||
- (instancetype)initWithPath:(NSString *)aPath NS_DESIGNATED_INITIALIZER;
|
||||
|
||||
- (NSString *)displayVersion;
|
||||
@property (readonly, copy) NSString *displayVersion;
|
||||
- (BOOL)hasAboutAs:(int)type;
|
||||
- (BOOL)hasConfigureAs:(int)type;
|
||||
- (long)runAs:(int)aType;
|
||||
- (long)shutdownAs:(int)aType;
|
||||
- (void)aboutAs:(int)type;
|
||||
- (void)configureAs:(int)type;
|
||||
- (BOOL)verifyOK;
|
||||
@property (readonly) BOOL verifyOK;
|
||||
|
||||
@end
|
||||
|
|
|
@ -118,7 +118,7 @@
|
|||
return returnArray;
|
||||
}
|
||||
|
||||
- (id)initWithPath:(NSString *)aPath
|
||||
- (instancetype)initWithPath:(NSString *)aPath
|
||||
{
|
||||
if (!(self = [super init])) {
|
||||
return nil;
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
return utisupport;
|
||||
}
|
||||
|
||||
- (id)initWithWindow:(NSWindow *)window
|
||||
- (instancetype)initWithWindow:(NSWindow *)window
|
||||
{
|
||||
self = [super initWithWindow:window];
|
||||
if (self) {
|
||||
|
@ -41,7 +41,7 @@
|
|||
return @"AddPluginSheet";
|
||||
}
|
||||
|
||||
- (id)init
|
||||
- (instancetype)init
|
||||
{
|
||||
return self = [self initWithWindowNibName:@"AddPluginSheet"];
|
||||
}
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
- (void)refreshPlugins;
|
||||
- (NSArray *)pluginsForType:(int)typeMask;
|
||||
- (BOOL)hasPluginAtPath:(NSString *)path;
|
||||
- (BOOL)configured;
|
||||
@property (readonly) BOOL configured;
|
||||
- (PcsxrPlugin *)activePluginForType:(int)type;
|
||||
- (BOOL)setActivePlugin:(PcsxrPlugin *)plugin forType:(int)type;
|
||||
|
||||
|
|
|
@ -35,7 +35,7 @@ const static int typeList[] = {PSE_LT_GPU, PSE_LT_SPU, PSE_LT_CDR, PSE_LT_PAD, P
|
|||
return sPluginList;
|
||||
}
|
||||
|
||||
- (id)init
|
||||
- (instancetype)init
|
||||
{
|
||||
NSUInteger i;
|
||||
|
||||
|
|
|
@ -33,4 +33,8 @@
|
|||
#import <Cocoa/Cocoa.h>
|
||||
#endif
|
||||
|
||||
#ifndef NS_DESIGNATED_INITIALIZER
|
||||
#define NS_DESIGNATED_INITIALIZER
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
|
|
@ -86,7 +86,7 @@ void sockDestroyWaitDlg()
|
|||
WaitCancel = 1;
|
||||
}
|
||||
|
||||
- (id)init
|
||||
- (instancetype)init
|
||||
{
|
||||
return self = [self initWithWindowNibName:@"SockDialog"];
|
||||
}
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
NSPoint initialLocation;
|
||||
}
|
||||
|
||||
- (BOOL) canBecomeKeyWindow; // to stop the beeping
|
||||
@property (readonly) BOOL canBecomeKeyWindow; // to stop the beeping
|
||||
|
||||
- (void) sendEvent:(NSEvent *)theEvent;
|
||||
- (void) windowDidResize:(NSNotification*)notice;
|
||||
|
|
Loading…
Reference in New Issue
Block a user