diff options
Diffstat (limited to 'macosx')
52 files changed, 73 insertions, 524 deletions
diff --git a/macosx/ARCBridge.h b/macosx/ARCBridge.h deleted file mode 100644 index 7e722980..00000000 --- a/macosx/ARCBridge.h +++ /dev/null @@ -1,42 +0,0 @@ -// -// ARCBridge.h -// PPMacho -// -// Created by C.W. Betts on 12/23/12. -// -// - -#ifndef PPMacho_ARCBridge_h -#define PPMacho_ARCBridge_h - -#if __has_feature(objc_arc) - -#define SUPERDEALLOC -#define RELEASEOBJ(obj) -#define RETAINOBJ(obj) obj -#define RETAINOBJNORETURN(obj) -#define AUTORELEASEOBJ(obj) obj -#define AUTORELEASEOBJNORETURN(obj) -#define BRIDGE(toType, obj) (__bridge toType)(obj) -#define __arcweak __weak -#define arcweak weak -#define arcstrong strong - -#else - -#define SUPERDEALLOC [super dealloc] -#define RELEASEOBJ(obj) [obj release] -#define RETAINOBJ(obj) [obj retain] -#define RETAINOBJNORETURN(obj) [obj retain] -#define AUTORELEASEOBJ(obj) [obj autorelease] -#define AUTORELEASEOBJNORETURN(obj) [obj autorelease] -#define BRIDGE(toType, obj) (toType)obj -#define __arcweak -#define arcweak assign -#define arcstrong retain - -#endif - -#define arcretain arcstrong - -#endif diff --git a/macosx/CheatController.h b/macosx/CheatController.h index e581886a..e943c5d2 100644 --- a/macosx/CheatController.h +++ b/macosx/CheatController.h @@ -4,7 +4,6 @@ // #import <Cocoa/Cocoa.h> -#import "ARCBridge.h" @class PcsxrHexadecimalFormatter; @@ -19,8 +18,8 @@ NSMutableArray *tempCheatCodes; NSMutableArray *cheats; } -@property (readwrite, arcretain) NSMutableArray *tempCheatCodes; -@property (readwrite, arcretain) NSMutableArray *cheats; +@property (readwrite, strong) NSMutableArray *tempCheatCodes; +@property (readwrite, strong) NSMutableArray *cheats; - (void)refresh; diff --git a/macosx/CheatController.m b/macosx/CheatController.m index 4650459a..14dbd408 100644 --- a/macosx/CheatController.m +++ b/macosx/CheatController.m @@ -7,7 +7,6 @@ #include "psxcommon.h" #include "cheat.h" #import "CheatController.h" -#import "ARCBridge.h" #import "PcsxrCheatHandler.h" #import "PcsxrHexadecimalFormatter.h" @@ -20,9 +19,9 @@ uint16_t value; } @property (readwrite) uint32_t address; -@property (readwrite, arcweak) NSNumber* addressNS; +@property (readwrite, weak) NSNumber* addressNS; @property (readwrite) uint16_t value; -@property (readwrite, arcweak) NSNumber* valueNS; +@property (readwrite, weak) NSNumber* valueNS; - (id)initWithAddress:(uint32_t)add value:(uint16_t)val; - (id)initWithCheatCode:(CheatCode *)theCheat; @@ -34,8 +33,8 @@ NSString *cheatName; BOOL enabled; } -@property (readwrite, arcretain) NSMutableArray *cheatValues; -@property (readwrite, arcretain) NSString *cheatName; +@property (readwrite, strong) NSMutableArray *cheatValues; +@property (readwrite, strong) NSString *cheatName; @property (readwrite, getter = isEnabled) BOOL enabled; - (id)initWithCheat:(Cheat *)theCheat; @@ -123,7 +122,7 @@ self.enabled = theCheat->Enabled ? YES : NO; self.cheatValues = [NSMutableArray arrayWithCapacity:theCheat->n]; for (int i = 0; i < theCheat->n; i++) { - [cheatValues addObject:AUTORELEASEOBJ([[PcsxrCheatTempObject alloc] initWithCheatCode:&CheatCodes[i+theCheat->First]])]; + [cheatValues addObject:[[PcsxrCheatTempObject alloc] initWithCheatCode:&CheatCodes[i+theCheat->First]]]; } } return self; @@ -139,16 +138,6 @@ return [NSString stringWithFormat:@"[%@%@]\n%@", enabled ? @"*" : @"", cheatName, [cheatValues componentsJoinedByString:@"\n"]]; } -#if !__has_feature(objc_arc) -- (void)dealloc -{ - self.cheatName = nil; - self.cheatValues = nil; - - [super dealloc]; -} -#endif - @end @implementation CheatController @@ -187,10 +176,8 @@ for (int i = 0; i < NumCheats; i++) { PcsxrCheatTemp *tmpObj = [[PcsxrCheatTemp alloc] initWithCheat:&Cheats[i]]; [tmpArray addObject:tmpObj]; - RELEASEOBJ(tmpObj); } self.cheats = tmpArray; - RELEASEOBJ(tmpArray); [self setDocumentEdited:NO]; } @@ -217,7 +204,7 @@ - (IBAction)loadCheats:(id)sender { - NSOpenPanel *openDlg = RETAINOBJ([NSOpenPanel openPanel]); + NSOpenPanel *openDlg = [NSOpenPanel openPanel]; [openDlg setCanChooseFiles:YES]; [openDlg setCanChooseDirectories:NO]; [openDlg setAllowsMultipleSelection:NO]; @@ -228,12 +215,11 @@ LoadCheats([[file path] fileSystemRepresentation]); [self refresh]; } - RELEASEOBJ(openDlg); } - (IBAction)saveCheats:(id)sender { - NSSavePanel *saveDlg = RETAINOBJ([NSSavePanel savePanel]); + NSSavePanel *saveDlg = [NSSavePanel savePanel]; [saveDlg setAllowedFileTypes:[PcsxrCheatHandler supportedUTIs]]; [saveDlg setCanSelectHiddenExtension:YES]; [saveDlg setCanCreateDirectories:YES]; @@ -243,7 +229,6 @@ NSString *saveString = [cheats componentsJoinedByString:@"\n"]; [saveString writeToURL:url atomically:YES encoding:NSUTF8StringEncoding error:NULL]; } - RELEASEOBJ(saveDlg); } - (IBAction)clear:(id)sender @@ -277,7 +262,7 @@ - (IBAction)addCheatValue:(id)sender { [self willChange:NSKeyValueChangeInsertion valuesAtIndexes:[NSIndexSet indexSetWithIndex:[tempCheatCodes count]] forKey:kTempCheatCodesName]; - [tempCheatCodes addObject:AUTORELEASEOBJ([[PcsxrCheatTempObject alloc] init])]; + [tempCheatCodes addObject:[[PcsxrCheatTempObject alloc] init]]; [self didChange:NSKeyValueChangeInsertion valuesAtIndexes:[NSIndexSet indexSetWithIndex:[tempCheatCodes count] - 1] forKey:kTempCheatCodesName]; } @@ -313,7 +298,6 @@ NSMutableArray *tmpArray = [[cheats objectAtIndex:[cheatView selectedRow]] cheatValues]; NSMutableArray *newCheats = [[NSMutableArray alloc] initWithArray:tmpArray copyItems:YES]; self.tempCheatCodes = newCheats; - RELEASEOBJ(newCheats); [NSApp beginSheet:editCheatWindow modalForWindow:[self window] modalDelegate:self didEndSelector:@selector(editCheatCodeSheetDidEnd:returnCode:contextInfo:) contextInfo:NULL]; } @@ -324,10 +308,8 @@ tmpCheat.cheatName = NSLocalizedString(@"New Cheat", @"New Cheat Name" ); PcsxrCheatTempObject *tmpObj = [[PcsxrCheatTempObject alloc] initWithAddress:0x10000000 value:0]; NSMutableArray *tmpArray = [NSMutableArray arrayWithObject:tmpObj]; - RELEASEOBJ(tmpObj); tmpCheat.cheatValues = tmpArray; [cheats addObject:tmpCheat]; - RELEASEOBJ(tmpCheat); [self didChange:NSKeyValueChangeInsertion valuesAtIndexes:[NSIndexSet indexSetWithIndex:[cheats count] - 1] forKey:kCheatsName]; [self setDocumentEdited:YES]; } diff --git a/macosx/Configs/Pcsxr.xcconfig b/macosx/Configs/Pcsxr.xcconfig index 89311b4c..bd3e3445 100644 --- a/macosx/Configs/Pcsxr.xcconfig +++ b/macosx/Configs/Pcsxr.xcconfig @@ -6,14 +6,14 @@ // // -ARCHS = $(ARCHS_STANDARD_32_64_BIT) +ARCHS = $(ARCHS_STANDARD_64_BIT) SDKROOT = macosx GCC_PREPROCESSOR_DEFINITIONS = _MACOSX=1 $(DEBUG_PREPROCESSOR_DEFINITIONS) DEBUG_INFORMATION_FORMAT = dwarf-with-dsym GCC_VERSION = com.apple.compilers.llvm.clang.1_0 -MACOSX_DEPLOYMENT_TARGET = 10.6 -VALID_ARCHS = i386 x86_64 -CLANG_ENABLE_OBJC_ARC[arch=x86_64] = YES +MACOSX_DEPLOYMENT_TARGET = 10.7 +VALID_ARCHS = x86_64 +CLANG_ENABLE_OBJC_ARC = YES GCC_DYNAMIC_NO_PIC = NO COMBINE_HIDPI_IMAGES = YES INFOPLIST_FILE = plugins/$(TARGET_NAME)/Info.plist diff --git a/macosx/ConfigurationController.m b/macosx/ConfigurationController.m index 67b61192..f21f13e7 100755 --- a/macosx/ConfigurationController.m +++ b/macosx/ConfigurationController.m @@ -6,7 +6,6 @@ #import "PcsxrMemCardHandler.h" #include "psxcommon.h" #include "plugins.h" -#import "ARCBridge.h" NSString *const memChangeNotifier = @"PcsxrMemoryCardDidChangeNotifier"; NSString *const memCardChangeNumberKey = @"PcsxrMemoryCardThatChangedKey"; @@ -62,7 +61,7 @@ NSString *const memCardChangeNumberKey = @"PcsxrMemoryCardThatChangedKey"; { NSInteger tag = [sender tag]; char *mcd; - NSOpenPanel *openDlg = RETAINOBJ([NSOpenPanel openPanel]); + NSOpenPanel *openDlg = [NSOpenPanel openPanel]; NSString *path; if (tag == 1) { @@ -85,14 +84,13 @@ NSString *const memCardChangeNumberKey = @"PcsxrMemoryCardThatChangedKey"; [ConfigurationController setMemoryCard:tag toURL:mcdURL]; } - RELEASEOBJ(openDlg); } + (void)mcdNewClicked:(id)sender { NSInteger tag = [sender tag]; char *mcd; - NSSavePanel *openDlg = RETAINOBJ([NSSavePanel savePanel]); + NSSavePanel *openDlg = [NSSavePanel savePanel]; NSString *path; if (tag == 1) { @@ -116,7 +114,6 @@ NSString *const memCardChangeNumberKey = @"PcsxrMemoryCardThatChangedKey"; [ConfigurationController setMemoryCard:tag toURL:mcdURL]; } - RELEASEOBJ(openDlg); } - (IBAction)setVideoType:(id)sender @@ -184,11 +181,6 @@ NSString *const memCardChangeNumberKey = @"PcsxrMemoryCardThatChangedKey"; [usesHleCell setEnabled:NO]; } -#ifdef __i386__ - //OS X on i386 doesn't like the dynarec core - [usesDynarecCell setState:NSOffState]; - [usesDynarecCell setEnabled:NO]; -#endif // setup labels @@ -220,15 +212,6 @@ NSString *const memCardChangeNumberKey = @"PcsxrMemoryCardThatChangedKey"; [hkController initialize]; } -#if !__has_feature(objc_arc) -- (void)dealloc -{ - [checkBoxDefaults release]; - - [super dealloc]; -} -#endif - - (NSString *)keyForSender:(id)sender { for (NSString *key in checkBoxDefaults) { diff --git a/macosx/EmuThread.m b/macosx/EmuThread.m index 28ef3814..29f13da8 100755 --- a/macosx/EmuThread.m +++ b/macosx/EmuThread.m @@ -14,7 +14,6 @@ #include "psxcommon.h" #include "plugins.h" #include "misc.h" -#import "ARCBridge.h" EmuThread *emuThread = nil; static NSString *defrostPath = nil; @@ -78,13 +77,12 @@ static pthread_mutex_t eventMutex; if (defrostPath) { LoadState([defrostPath fileSystemRepresentation]); - RELEASEOBJ(defrostPath); defrostPath = nil; + defrostPath = nil; } psxCpu->Execute(); done: - AUTORELEASEOBJNORETURN(emuThread); emuThread = nil; return; @@ -103,7 +101,6 @@ done: psxCpu->Execute(); done: - AUTORELEASEOBJNORETURN(emuThread); emuThread = nil; return; @@ -113,8 +110,6 @@ done: { // remove all registered observers [[NSNotificationCenter defaultCenter] removeObserver:self]; - - SUPERDEALLOC; } - (void)emuWindowDidClose:(NSNotification *)aNotification @@ -144,7 +139,6 @@ done: while (safeEvent) { if (safeEvent & EMUEVENT_STOP) { /* signify that the emulation has stopped */ - AUTORELEASEOBJNORETURN(emuThread); emuThread = nil; paused = NO; @@ -337,7 +331,6 @@ done: + (void)resetNow { /* signify that the emulation has stopped */ - AUTORELEASEOBJNORETURN(emuThread); emuThread = nil; ClosePlugins(); @@ -388,7 +381,7 @@ done: if (CheckState(cPath) != 0) return NO; - defrostPath = RETAINOBJ(path); + defrostPath = path; [EmuThread reset]; GPU_displayText(_("*PCSXR*: Loaded State")); diff --git a/macosx/HotkeyController.m b/macosx/HotkeyController.m index f07ac591..c084d549 100755 --- a/macosx/HotkeyController.m +++ b/macosx/HotkeyController.m @@ -8,7 +8,6 @@ */ #import "HotkeyController.h" -#import "ARCBridge.h" #define INPUT_HOLD_TIME 0.1 @@ -35,14 +34,6 @@ - (void)dealloc { [[NSNotificationCenter defaultCenter] removeObserver:self]; - -#if !__has_feature(objc_arc) - [hotkeysList release]; - [keyNameTable release]; - [hotkeyOutlets release]; - - [super dealloc]; -#endif } - (void)mapOutletToIdentifier:(id)outlet forIdentifier:(NSString*)identifier diff --git a/macosx/LaunchArg.h b/macosx/LaunchArg.h index 25bfe7a6..a76d7d2a 100644 --- a/macosx/LaunchArg.h +++ b/macosx/LaunchArg.h @@ -7,7 +7,6 @@ // #import <Foundation/Foundation.h> -#import "ARCBridge.h" typedef enum _LaunchArgOrder { LaunchArgPreRun = 0, @@ -23,7 +22,7 @@ typedef enum _LaunchArgOrder { } @property (readonly) LaunchArgOrder launchOrder; @property (readonly, copy, nonatomic) dispatch_block_t theBlock; -@property (readonly, arcretain) NSString *argument; +@property (readonly, strong) NSString *argument; - (id)initWithLaunchOrder:(LaunchArgOrder)order block:(dispatch_block_t)block argument:(NSString*)arg; - (id)initWithLaunchOrder:(LaunchArgOrder)order argument:(NSString*)arg block:(dispatch_block_t)block; diff --git a/macosx/LaunchArg.m b/macosx/LaunchArg.m index 5f546398..fc3d4e8e 100644 --- a/macosx/LaunchArg.m +++ b/macosx/LaunchArg.m @@ -11,7 +11,7 @@ @interface LaunchArg () @property (readwrite) LaunchArgOrder launchOrder; @property (readwrite, copy, nonatomic) dispatch_block_t theBlock; -@property (readwrite, arcretain) NSString *argument; +@property (readwrite, strong) NSString *argument; @end @@ -21,16 +21,7 @@ @synthesize theBlock = _theBlock; - (void)setTheBlock:(dispatch_block_t)theBlock { -#if __has_feature(objc_arc) _theBlock = [theBlock copy]; -#else - if (_theBlock == theBlock) { - return; - } - dispatch_block_t tmpBlock = _theBlock; - _theBlock = [theBlock copy]; - [tmpBlock release]; -#endif } - (id)initWithLaunchOrder:(LaunchArgOrder)order argument:(NSString*)arg block:(dispatch_block_t)block @@ -58,14 +49,4 @@ return [NSString stringWithFormat:@"Arg: %@, order: %u, block addr: %p", _argument, _launchOrder, _theBlock]; } -#if !__has_feature(objc_arc) -- (void)dealloc -{ - self.theBlock = nil; - self.argument = nil; - - [super dealloc]; -} -#endif - @end diff --git a/macosx/MemBadgeView.m b/macosx/MemBadgeView.m index 090b88fc..e15a6302 100644 --- a/macosx/MemBadgeView.m +++ b/macosx/MemBadgeView.m @@ -7,7 +7,6 @@ // #import "MemBadgeView.h" -#import "ARCBridge.h" @implementation MemBadgeView @@ -46,8 +45,6 @@ [tmpDraw unlockFocus]; [tmpDraw drawInRect:dirtyRect fromRect:dirtyRect operation:NSCompositeSourceOver fraction:1.0]; - - RELEASEOBJ(tmpDraw); } } diff --git a/macosx/Pcsxr.xcodeproj/project.pbxproj b/macosx/Pcsxr.xcodeproj/project.pbxproj index 47494953..cd91fea3 100644 --- a/macosx/Pcsxr.xcodeproj/project.pbxproj +++ b/macosx/Pcsxr.xcodeproj/project.pbxproj @@ -233,8 +233,6 @@ 71F4C5AB0FDED12800529849 /* r3000a.c in Sources */ = {isa = PBXBuildFile; fileRef = 71F4C5820FDED12800529849 /* r3000a.c */; }; 71F4C5AD0FDED12800529849 /* sio.c in Sources */ = {isa = PBXBuildFile; fileRef = 71F4C5840FDED12800529849 /* sio.c */; }; 71F4C5AF0FDED12800529849 /* spu.c in Sources */ = {isa = PBXBuildFile; fileRef = 71F4C5860FDED12800529849 /* spu.c */; }; - 71F4C5B90FDED16D00529849 /* iR3000A.c in Sources */ = {isa = PBXBuildFile; fileRef = 71F4C5B50FDED16D00529849 /* iR3000A.c */; }; - 71F4C5BA0FDED16D00529849 /* ix86.c in Sources */ = {isa = PBXBuildFile; fileRef = 71F4C5B60FDED16D00529849 /* ix86.c */; }; D422E66E16DC48D000526DCF /* CheatWindow.xib in Resources */ = {isa = PBXBuildFile; fileRef = D422E66C16DC48D000526DCF /* CheatWindow.xib */; }; D422E67A16DC495800526DCF /* CheatController.m in Sources */ = {isa = PBXBuildFile; fileRef = D422E67916DC495800526DCF /* CheatController.m */; }; /* End PBXBuildFile section */ @@ -676,7 +674,6 @@ 55A9021F147D7C380037E18F /* PcsxrMemCardController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PcsxrMemCardController.m; sourceTree = "<group>"; usesTabs = 1; }; 55A90227147D89380037E18F /* PcsxrMemoryObject.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = PcsxrMemoryObject.h; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; }; 55A90228147D89380037E18F /* PcsxrMemoryObject.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = PcsxrMemoryObject.m; sourceTree = "<group>"; usesTabs = 1; xcLanguageSpecificationIdentifier = xcode.lang.objc; }; - 55BB3493169CD42500850200 /* ARCBridge.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = ARCBridge.h; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; }; 55BBA690149454DE003B2CEC /* PcsxrFileHandle.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PcsxrFileHandle.h; sourceTree = "<group>"; }; 55BBA691149455E1003B2CEC /* PcsxrMemCardHandler.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PcsxrMemCardHandler.h; sourceTree = "<group>"; }; 55BBA692149455E1003B2CEC /* PcsxrMemCardHandler.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PcsxrMemCardHandler.m; sourceTree = "<group>"; usesTabs = 1; }; @@ -745,10 +742,6 @@ 71F4C5860FDED12800529849 /* spu.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = spu.c; sourceTree = "<group>"; }; 71F4C5870FDED12800529849 /* spu.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = spu.h; sourceTree = "<group>"; }; 71F4C5880FDED12800529849 /* system.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = system.h; sourceTree = "<group>"; }; - 71F4C5B40FDED16D00529849 /* iGte.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = iGte.h; sourceTree = "<group>"; }; - 71F4C5B50FDED16D00529849 /* iR3000A.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = iR3000A.c; sourceTree = "<group>"; }; - 71F4C5B60FDED16D00529849 /* ix86.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ix86.c; sourceTree = "<group>"; }; - 71F4C5B70FDED16D00529849 /* ix86.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ix86.h; sourceTree = "<group>"; }; 71F703A611B3A673007DD5C5 /* sjisfont.h */ = {isa = PBXFileReference; fileEncoding = 0; lastKnownFileType = sourcecode.c.h; path = sjisfont.h; sourceTree = "<group>"; }; D422E66D16DC48D000526DCF /* English */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = English; path = English.lproj/CheatWindow.xib; sourceTree = "<group>"; }; D422E67816DC495800526DCF /* CheatController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CheatController.h; sourceTree = "<group>"; }; @@ -938,7 +931,6 @@ 557649B71786AF92007C4457 /* Plug-in handling */, 557649B81786AFB7007C4457 /* Controllers */, 55E0ACE1178B850B0005C945 /* Helper Classes */, - 55BB3493169CD42500850200 /* ARCBridge.h */, 7161C2810FDED6D000225F97 /* config.h */, 2BA178A505148D9D0026D74D /* main.m */, 2BBB17DA051E4D0F00B84448 /* Plugin.c */, @@ -953,7 +945,6 @@ 2BCE23B204C6B52C007C2DA3 /* libpcsxcore */ = { isa = PBXGroup; children = ( - 71F4C5B30FDED15800529849 /* ix86 */, 559366BF12B694DF004ACC1E /* ix86_64 */, 71F4C5600FDED12800529849 /* cdriso.c */, 71F4C5610FDED12800529849 /* cdriso.h */, @@ -1590,17 +1581,6 @@ name = "Helper Classes"; sourceTree = "<group>"; }; - 71F4C5B30FDED15800529849 /* ix86 */ = { - isa = PBXGroup; - children = ( - 71F4C5B40FDED16D00529849 /* iGte.h */, - 71F4C5B50FDED16D00529849 /* iR3000A.c */, - 71F4C5B60FDED16D00529849 /* ix86.c */, - 71F4C5B70FDED16D00529849 /* ix86.h */, - ); - path = ix86; - sourceTree = "<group>"; - }; /* End PBXGroup section */ /* Begin PBXHeadersBuildPhase section */ @@ -2009,8 +1989,6 @@ 71F4C5AB0FDED12800529849 /* r3000a.c in Sources */, 71F4C5AD0FDED12800529849 /* sio.c in Sources */, 71F4C5AF0FDED12800529849 /* spu.c in Sources */, - 71F4C5B90FDED16D00529849 /* iR3000A.c in Sources */, - 71F4C5BA0FDED16D00529849 /* ix86.c in Sources */, 712FD1E81093096F00575A92 /* debug.c in Sources */, 712FD1E91093096F00575A92 /* socket.c in Sources */, 713B530E110B75650002F164 /* ppf.c in Sources */, @@ -2943,7 +2921,6 @@ ../libpcsxcore, ../macosx, ); - MACOSX_DEPLOYMENT_TARGET = 10.7; }; name = Instrument; }; @@ -3240,7 +3217,6 @@ ../libpcsxcore, ../macosx, ); - MACOSX_DEPLOYMENT_TARGET = 10.7; }; name = Debug; }; @@ -3263,7 +3239,6 @@ ../libpcsxcore, ../macosx, ); - MACOSX_DEPLOYMENT_TARGET = 10.7; }; name = Release; }; diff --git a/macosx/PcsxrCheatHandler.m b/macosx/PcsxrCheatHandler.m index 547b7244..54f6cb5b 100644 --- a/macosx/PcsxrCheatHandler.m +++ b/macosx/PcsxrCheatHandler.m @@ -7,7 +7,6 @@ // #import "PcsxrCheatHandler.h" -#import "ARCBridge.h" #import "CheatController.h" #import "PcsxrController.h" #include "psxcommon.h" @@ -20,7 +19,6 @@ static NSArray *utisupport; if (utisupport == nil) { utisupport = @[@"com.codeplex.pcsxr.cheat"]; - RETAINOBJNORETURN(utisupport); } return utisupport; } diff --git a/macosx/PcsxrController.m b/macosx/PcsxrController.m index f00e447d..65294109 100755 --- a/macosx/PcsxrController.m +++ b/macosx/PcsxrController.m @@ -14,7 +14,6 @@ #include "misc.h" #include "cdrom.h" #include "ExtendedKeys.h" -#import "ARCBridge.h" NSDictionary *prefStringKeys; NSDictionary *prefByteKeys; @@ -50,7 +49,7 @@ void ShowHelpAndExit(FILE* output, int exitCode) @property (readwrite) BOOL endAtEmuClose; @property BOOL sleepInBackground; @property BOOL wasPausedBeforeBGSwitch; -@property (arcstrong) NSMutableArray *skipFiles; +@property (strong) NSMutableArray *skipFiles; @end @implementation PcsxrController @@ -103,7 +102,7 @@ void ShowHelpAndExit(FILE* output, int exitCode) // switch to another ISO if using internal image reader, otherwise eject the CD if (UsingIso()) { - NSOpenPanel* openDlg = RETAINOBJ([NSOpenPanel openPanel]); + NSOpenPanel* openDlg = [NSOpenPanel openPanel]; [openDlg setCanChooseFiles:YES]; [openDlg setCanChooseDirectories:NO]; @@ -115,7 +114,6 @@ void ShowHelpAndExit(FILE* output, int exitCode) SetCdOpenCaseTime(time(NULL) + 2); LidInterrupt(); } - RELEASEOBJ(openDlg); } else { char *driveLetter = CDR_getDriveLetter(); @@ -201,7 +199,7 @@ void ShowHelpAndExit(FILE* output, int exitCode) - (IBAction)runIso:(id)sender { - NSOpenPanel* openDlg = RETAINOBJ([NSOpenPanel openPanel]); + NSOpenPanel* openDlg = [NSOpenPanel openPanel]; [openDlg setCanChooseFiles:YES]; [openDlg setCanChooseDirectories:NO]; @@ -212,7 +210,6 @@ void ShowHelpAndExit(FILE* output, int exitCode) [recentItems addRecentItem:url]; [self runURL:url]; } - RELEASEOBJ(openDlg); } - (IBAction)runBios:(id)sender @@ -428,7 +425,6 @@ otherblock();\ [self runCD:nil]; }]; [larg addToDictionary:argDict]; - RELEASEOBJ(larg); }; dispatch_block_t biosBlock = ^{ @@ -437,7 +433,6 @@ otherblock();\ [self runBios:nil]; }]; [larg addToDictionary:argDict]; - RELEASEOBJ(larg); }; //This block/argument does not need to be sorted @@ -447,7 +442,6 @@ otherblock();\ self.endAtEmuClose = YES; }]; [larg addToDictionary:argDict]; - RELEASEOBJ(larg); }; dispatch_block_t isoBlock = ^{ @@ -457,7 +451,6 @@ otherblock();\ [self runURL:[NSURL fileURLWithPath:path isDirectory:NO]]; }]; [larg addToDictionary:argDict]; - RELEASEOBJ(larg); }; void (^mcdBlock)(int mcdNumber) = ^(int mcdnumber){ @@ -474,7 +467,6 @@ otherblock();\ LoadMcd(mcdnumber, (char*)[path fileSystemRepresentation]); }]; [larg addToDictionary:argDict]; - RELEASEOBJ(larg); }; dispatch_block_t freezeBlock = ^{ @@ -488,7 +480,6 @@ otherblock();\ } }]; [larg addToDictionary:argDict]; - RELEASEOBJ(larg); }; BOOL hasFileTestBlock = NO; @@ -527,7 +518,7 @@ otherblock();\ #ifdef DEBUG if ([unknownOptions count]) { //As there doesn't seem to be a Cocoa/Objective-C method like this... - NSString *unknownString = CFBridgingRelease(CFStringCreateByCombiningStrings(kCFAllocatorDefault, BRIDGE(CFArrayRef, unknownOptions), CFSTR(" "))); + NSString *unknownString = [unknownOptions componentsJoinedByString:@" "]; NSLog(@"The following options weren't recognized by PCSX-R: %@. This may be due to extra arguments passed by the OS or debugger.", unknownString); } @@ -535,14 +526,13 @@ otherblock();\ unknownOptions = nil; if (!isLaunchable && hasParsedAnArgument) { NSMutableArray *mutProgArgs = [NSMutableArray arrayWithArray:progArgs]; - NSString *appRawPath = RETAINOBJ([mutProgArgs objectAtIndex:0]); + NSString *appRawPath = [mutProgArgs objectAtIndex:0]; //Remove the app file path from the array [mutProgArgs removeObjectAtIndex:0]; NSString *arg = [mutProgArgs componentsJoinedByString:@" "]; NSString *recognizedArgs = [[argDict allKeys] componentsJoinedByString:@" "]; NSString *tmpStr = [NSString stringWithFormat:@"A launch command wasn't found in the command line and one or more arguments that PCSX-R recognizes were: %@.\nThe following command line arguments were passed with the application launch file at %@: %@.\n\nThe valid launch commands are %@, %@, and %@.", recognizedArgs, appRawPath, arg, kPCSXRArgumentISO, kPCSXRArgumentCDROM, kPCSXRArgumentBIOS]; - RELEASEOBJ(appRawPath); ParseErrorStr(tmpStr); } else if (hasParsedAnArgument){ NSArray *argArray = [[argDict allValues] sortedArrayWithOptions:NSSortStable usingComparator:^NSComparisonResult(id obj1, id obj2) { @@ -560,20 +550,9 @@ otherblock();\ arg.theBlock(); } } - RELEASEOBJ(argDict); } } -#if !__has_feature(objc_arc) -- (void)dealloc -{ - [pluginList release]; - self.skipFiles = nil; - - [super dealloc]; -} -#endif - + (void)setConfigFromDefaults { const char *str; @@ -590,13 +569,6 @@ otherblock();\ for (NSString *key in prefByteKeys) { u8 *dst = (u8 *)[[prefByteKeys objectForKey:key] pointerValue]; if (dst != NULL) *dst = [defaults boolForKey:key]; -#ifdef __i386__ - //i386 on OS X doesn't like the dynarec core - if ([key isEqualToString:@"NoDynarec"]) { - if (dst != NULL) *dst = 1; - [defaults setBool:YES forKey:key]; - } -#endif } // special cases @@ -857,7 +829,6 @@ otherblock();\ static NSArray *handlers = nil; if (handlers == nil) { handlers = @[[PcsxrPluginHandler class], [PcsxrMemCardHandler class], [PcsxrFreezeStateHandler class], [PcsxrDiscHandler class], [PcsxrCheatHandler class]]; - RETAINOBJNORETURN(handlers); } BOOL isHandled = NO; for (Class fileHandler in handlers) { @@ -871,10 +842,8 @@ otherblock();\ } if (canHandle) { isHandled = [hand handleFile:filename]; - RELEASEOBJ(hand); break; } - RELEASEOBJ(hand); } return isHandled; diff --git a/macosx/PcsxrDiscHandler.h b/macosx/PcsxrDiscHandler.h index 8ff673fb..933d7799 100755 --- a/macosx/PcsxrDiscHandler.h +++ b/macosx/PcsxrDiscHandler.h @@ -8,12 +8,7 @@ #import <Foundation/Foundation.h> #import "PcsxrFileHandle.h" -#import "ARCBridge.h" @interface PcsxrDiscHandler : NSObject <PcsxrFileHandle> -{ - NSURL *_discURL; - __arcweak NSString *discPath; -} @end diff --git a/macosx/PcsxrDiscHandler.m b/macosx/PcsxrDiscHandler.m index eceec784..a7b0c04f 100755 --- a/macosx/PcsxrDiscHandler.m +++ b/macosx/PcsxrDiscHandler.m @@ -13,11 +13,10 @@ #include "cdrom.h" #import "RecentItemsMenu.h" #import "PcsxrController.h" -#import "ARCBridge.h" @interface PcsxrDiscHandler () -@property (nonatomic, arcstrong) NSURL *discURL; -@property (arcweak) NSString *discPath; +@property (nonatomic, strong) NSURL *discURL; +@property (weak) NSString *discPath; @end @implementation PcsxrDiscHandler @@ -37,7 +36,6 @@ static NSArray *utisupport = nil; if (utisupport == nil) { utisupport = @[@"com.alcohol-soft.mdfdisc", @"com.goldenhawk.cdrwin-cuesheet", @"com.apple.disk-image-ndif", @"public.iso-image", @"com.sony.psp.firmware", @"com.codeplex.pcsxr.compressed-bin-image"]; - RETAINOBJNORETURN(utisupport); } return utisupport; } @@ -54,13 +52,4 @@ return YES; } -#if !__has_feature(objc_arc) -- (void)dealloc -{ - self.discURL = nil; - - [super dealloc]; -} -#endif - @end diff --git a/macosx/PcsxrFreezeStateHandler.m b/macosx/PcsxrFreezeStateHandler.m index 8617f891..b300fe02 100755 --- a/macosx/PcsxrFreezeStateHandler.m +++ b/macosx/PcsxrFreezeStateHandler.m @@ -8,7 +8,6 @@ #import "PcsxrFreezeStateHandler.h" #import "EmuThread.h" -#import "ARCBridge.h" #import "PluginList.h" #include "misc.h" @@ -19,7 +18,6 @@ static NSArray *utisupport = nil; if (utisupport == nil) { utisupport = @[@"com.codeplex.pcsxr.freeze"]; - RETAINOBJNORETURN(utisupport); } return utisupport; } diff --git a/macosx/PcsxrMemCardArray.m b/macosx/PcsxrMemCardArray.m index 99a1f492..a867c938 100644 --- a/macosx/PcsxrMemCardArray.m +++ b/macosx/PcsxrMemCardArray.m @@ -7,7 +7,6 @@ // #import "PcsxrMemCardArray.h" -#import "ARCBridge.h" #import "ConfigurationController.h" #include "sio.h" @@ -65,7 +64,7 @@ static inline void ClearMemcardData(char *to, int dsti, char *str) } @interface PcsxrMemCardArray () -@property (arcretain) NSArray *rawArray; +@property (strong) NSArray *rawArray; @property (readonly) char* memDataPtr; @end @@ -124,12 +123,10 @@ static inline void ClearMemcardData(char *to, int dsti, char *str) @autoreleasepool { PcsxrMemoryObject *obj = [[PcsxrMemoryObject alloc] initWithMcdBlock:&memBlock startingIndex:i size:x]; [tmpMemArray addObject:obj]; - RELEASEOBJ(obj); } i += x; } self.rawArray = [NSArray arrayWithArray:tmpMemArray]; - RELEASEOBJ(tmpMemArray); } return self; } @@ -240,7 +237,7 @@ static inline void ClearMemcardData(char *to, int dsti, char *str) theBlock.Flags = 0xA0; theBlock.IconCount = 0; PcsxrMemoryObject *freeObj = [[PcsxrMemoryObject alloc] initWithMcdBlock:&theBlock startingIndex:MAX_MEMCARD_BLOCKS - 1 - freeSize size:freeSize]; - return [rawArray arrayByAddingObject:AUTORELEASEOBJ(freeObj)]; + return [rawArray arrayByAddingObject:freeObj]; } else return rawArray; } @@ -345,13 +342,4 @@ static inline void ClearMemcardData(char *to, int dsti, char *str) } } -#if !__has_feature(objc_arc) -- (void)dealloc -{ - self.rawArray = nil; - - [super dealloc]; -} -#endif - @end diff --git a/macosx/PcsxrMemCardController.h b/macosx/PcsxrMemCardController.h index 213e1e2c..f62713c7 100755 --- a/macosx/PcsxrMemCardController.h +++ b/macosx/PcsxrMemCardController.h @@ -7,7 +7,6 @@ // #import <Cocoa/Cocoa.h> -#import "ARCBridge.h" @class PcsxrMemCardArray; @interface PcsxrMemCardController : NSViewController @@ -21,8 +20,8 @@ PcsxrMemCardArray *memCard2Array; NSTimer *imageAnimateTimer; } -@property (readonly, arcretain) PcsxrMemCardArray *memCard1Array; -@property (readonly, arcretain) PcsxrMemCardArray *memCard2Array; +@property (readonly, strong) PcsxrMemCardArray *memCard1Array; +@property (readonly, strong) PcsxrMemCardArray *memCard2Array; - (IBAction)moveBlock:(id)sender; - (IBAction)formatCard:(id)sender; diff --git a/macosx/PcsxrMemCardController.m b/macosx/PcsxrMemCardController.m index 021eb662..18c63cbf 100755 --- a/macosx/PcsxrMemCardController.m +++ b/macosx/PcsxrMemCardController.m @@ -12,13 +12,12 @@ #import "PcsxrMemCardHandler.h" #import "PcsxrMemCardArray.h" #include "sio.h" -#import "ARCBridge.h" #define MAX_MEMCARD_BLOCKS 15 @interface PcsxrMemCardController () -@property (readwrite, arcretain) PcsxrMemCardArray *memCard1Array; -@property (readwrite, arcretain) PcsxrMemCardArray *memCard2Array; +@property (readwrite, strong) PcsxrMemCardArray *memCard1Array; +@property (readwrite, strong) PcsxrMemCardArray *memCard2Array; @end @implementation PcsxrMemCardController @@ -68,7 +67,6 @@ } else { [self setMemCard2Array:newArray]; } - RELEASEOBJ(newArray); } - (void)memoryCardDidChangeNotification:(NSNotification *)aNote @@ -231,14 +229,6 @@ { [[NSNotificationCenter defaultCenter] removeObserver:self]; [imageAnimateTimer invalidate]; - -#if !__has_feature(objc_arc) - [imageAnimateTimer release]; - self.memCard1Array = nil; - self.memCard2Array = nil; - - [super dealloc]; -#endif } @end diff --git a/macosx/PcsxrMemCardHandler.m b/macosx/PcsxrMemCardHandler.m index a9710822..ec216922 100755 --- a/macosx/PcsxrMemCardHandler.m +++ b/macosx/PcsxrMemCardHandler.m @@ -9,7 +9,6 @@ #import "PcsxrMemCardHandler.h" #import "ConfigurationController.h" #import "EmuThread.h" -#import "ARCBridge.h" @implementation PcsxrMemCardHandler @@ -18,7 +17,6 @@ static NSArray *utisupport = nil; if (utisupport == nil) { utisupport = @[@"com.codeplex.pcsxr.memcard"]; - RETAINOBJNORETURN(utisupport); } return utisupport; } diff --git a/macosx/PcsxrMemoryObject.h b/macosx/PcsxrMemoryObject.h index 0e2e79d2..72613391 100755 --- a/macosx/PcsxrMemoryObject.h +++ b/macosx/PcsxrMemoryObject.h @@ -8,7 +8,6 @@ #import <Foundation/NSObject.h> #include "sio.h" -#import "ARCBridge.h" @class NSImage; @class NSString; @@ -27,11 +26,6 @@ typedef enum _PCSXRMemFlags { @interface PcsxrMemoryObject : NSObject { - NSString *englishName; - NSString *sjisName; - NSString *memName; - NSString *memID; - NSArray *memImages; NSInteger memImageIndex; uint8_t startingIndex; @@ -46,10 +40,10 @@ typedef enum _PCSXRMemFlags { - (id)initWithMcdBlock:(McdBlock *)infoBlockc startingIndex:(uint8_t)startIdx; - (id)initWithMcdBlock:(McdBlock *)infoBlockc startingIndex:(uint8_t)startIdx size:(uint8_t)memSize; -@property (readonly, arcstrong) NSString *englishName; -@property (readonly, arcstrong) NSString *sjisName; -@property (readonly, arcstrong) NSString *memName; -@property (readonly, arcstrong) NSString *memID; +@property (readonly, strong) NSString *englishName; +@property (readonly, strong) NSString *sjisName; +@property (readonly, strong) NSString *memName; +@property (readonly, strong) NSString *memID; @property (readonly) PCSXRMemFlags flagNameIndex; @property (readonly) uint8_t startingIndex; @property (readonly) uint8_t blockSize; diff --git a/macosx/PcsxrMemoryObject.m b/macosx/PcsxrMemoryObject.m index 5e37a6e6..12b63176 100755 --- a/macosx/PcsxrMemoryObject.m +++ b/macosx/PcsxrMemoryObject.m @@ -13,20 +13,19 @@ #import <AppKit/NSImage.h> #import <AppKit/NSBezierPath.h> #import <AppKit/NSAttributedString.h> -#import "ARCBridge.h" NSString *const memoryAnimateTimerKey = @"PCSXR Memory Card Image Animate"; @interface PcsxrMemoryObject () -@property (readwrite, arcstrong) NSString *englishName; -@property (readwrite, arcstrong) NSString *sjisName; -@property (readwrite, arcstrong) NSString *memName; -@property (readwrite, arcstrong) NSString *memID; +@property (readwrite, strong) NSString *englishName; +@property (readwrite, strong) NSString *sjisName; +@property (readwrite, strong) NSString *memName; +@property (readwrite, strong) NSString *memID; @property (readwrite) uint8_t startingIndex; @property (readwrite) uint8_t blockSize; @property (readwrite, nonatomic) NSInteger memImageIndex; -@property (arcstrong) NSArray *memImages; +@property (strong) NSArray *memImages; @property (readwrite) PCSXRMemFlags flagNameIndex; @end @@ -54,14 +53,11 @@ NSString *const memoryAnimateTimerKey = @"PCSXR Memory Card Image Animate"; } memImage = [[NSImage alloc] init]; [memImage addRepresentation:imageRep]; - RELEASEOBJ(imageRep); [memImage setSize:NSMakeSize(32, 32)]; } [imagesArray addObject:memImage]; - RELEASEOBJ(memImage); } NSArray *retArray = [NSArray arrayWithArray:imagesArray]; - RELEASEOBJ(imagesArray); return retArray; } @@ -255,28 +251,23 @@ NS_INLINE void SetupAttrStr(NSMutableAttributedString *mutStr, NSColor *txtclr) NSMutableAttributedString *tmpStr = [[NSMutableAttributedString alloc] initWithString:MemLabelFree]; SetupAttrStr(tmpStr, [NSColor greenColor]); attribMemLabelFree = [tmpStr copy]; - RELEASEOBJ(tmpStr); #ifdef DEBUG tmpStr = [[NSMutableAttributedString alloc] initWithString:MemLabelEndLink]; SetupAttrStr(tmpStr, [NSColor blueColor]); attribMemLabelEndLink = [tmpStr copy]; - RELEASEOBJ(tmpStr); tmpStr = [[NSMutableAttributedString alloc] initWithString:MemLabelLink]; SetupAttrStr(tmpStr, [NSColor blueColor]); attribMemLabelLink = [tmpStr copy]; - RELEASEOBJ(tmpStr); tmpStr = [[NSMutableAttributedString alloc] initWithString:MemLabelUsed]; SetupAttrStr(tmpStr, [NSColor controlTextColor]); attribMemLabelUsed = [tmpStr copy]; - RELEASEOBJ(tmpStr); #else tmpStr = [[NSMutableAttributedString alloc] initWithString:@"Multi-save"]; SetupAttrStr(tmpStr, [NSColor blueColor]); attribMemLabelEndLink = [tmpStr copy]; - RELEASEOBJ(tmpStr); //tmpStr = [[NSMutableAttributedString alloc] initWithString:@"Multi-save"]; //SetupAttrStr(tmpStr, [NSColor blueColor]); @@ -291,7 +282,6 @@ NS_INLINE void SetupAttrStr(NSMutableAttributedString *mutStr, NSColor *txtclr) tmpStr = [[NSMutableAttributedString alloc] initWithString:MemLabelDeleted]; SetupAttrStr(tmpStr, [NSColor redColor]); attribMemLabelDeleted = [tmpStr copy]; - RELEASEOBJ(tmpStr); }); switch (flagNameIndex) { @@ -333,15 +323,6 @@ NS_INLINE void SetupAttrStr(NSMutableAttributedString *mutStr, NSColor *txtclr) - (void)dealloc { [[NSNotificationCenter defaultCenter] removeObserver:self]; -#if !__has_feature(objc_arc) - self.englishName = nil; - self.sjisName = nil; - self.memName = nil; - self.memID = nil; - self.memImages = nil; - - [super dealloc]; -#endif } - (NSString *)description diff --git a/macosx/PcsxrPlugin.h b/macosx/PcsxrPlugin.h index ca8ae625..3eb2b549 100755 --- a/macosx/PcsxrPlugin.h +++ b/macosx/PcsxrPlugin.h @@ -7,14 +7,11 @@ // #import <Foundation/Foundation.h> -#import "ARCBridge.h" @interface PcsxrPlugin : NSObject { void *pluginRef; - NSString *path; NSDate *modDate; - NSString *name; NSString *fullPlugPath; long version; int type; @@ -22,7 +19,7 @@ } @property (readonly, copy) NSString *path; -@property (readonly, arcstrong) NSString *name; +@property (readonly, strong) NSString *name; + (NSString *)prefixForType:(int)type; + (NSString *)defaultKeyForType:(int)type; diff --git a/macosx/PcsxrPlugin.m b/macosx/PcsxrPlugin.m index 3d5b68b7..eab352be 100755 --- a/macosx/PcsxrPlugin.m +++ b/macosx/PcsxrPlugin.m @@ -10,7 +10,6 @@ #import "PcsxrPlugin.h" #include "psxcommon.h" #include "plugins.h" -#import "ARCBridge.h" #define kPCSXRGetLibName "PSEgetLibName" #define kPCSXRGetLibVersion "PSEgetLibVersion" @@ -18,9 +17,9 @@ @interface PcsxrPlugin () @property (readwrite, copy) NSString *path; -@property (readwrite, arcstrong) NSDate *modDate; -@property (readwrite, arcstrong) NSString *name; -@property (readwrite, arcstrong) NSString *fullPlugPath; +@property (readwrite, strong) NSDate *modDate; +@property (readwrite, strong) NSString *name; +@property (readwrite, strong) NSString *fullPlugPath; @end @implementation PcsxrPlugin @@ -161,14 +160,12 @@ } if (goodPath == nil) { - AUTORELEASEOBJNORETURN(self); return nil; } pluginRef = SysLoadLibrary([goodPath fileSystemRepresentation]); if (pluginRef == NULL) { SysLibError(); - AUTORELEASEOBJNORETURN(self); return nil; } @@ -188,13 +185,11 @@ else if (([path rangeOfString: @"sio1" options:NSCaseInsensitiveSearch]).length != 0) type = PSE_LT_SIO1; else { - AUTORELEASEOBJNORETURN(self); return nil; } } else { type = (int)PSE_getLibType(); if (type != PSE_LT_GPU && type != PSE_LT_CDR && type != PSE_LT_SPU && type != PSE_LT_PAD && type != PSE_LT_NET && type != PSE_LT_SIO1) { - AUTORELEASEOBJNORETURN(self); return nil; } } @@ -236,15 +231,6 @@ SysCloseLibrary(pluginRef); pluginRef = NULL; } - -#if !__has_feature(objc_arc) - self.modDate = nil; - self.path = nil; - self.name = nil; - self.fullPlugPath = nil; - - [super dealloc]; -#endif } #define PluginSymbolName(type, theName) [[PcsxrPlugin prefixForType:type] stringByAppendingString:theName] @@ -262,7 +248,6 @@ NSBeep(); } - RELEASEOBJ(arg); return; } } @@ -351,7 +336,6 @@ NSString *aboutSym = PluginSymbolNameAbout(aType); arg = @[aboutSym, @0]; - RETAINOBJNORETURN(arg); // detach a new thread [NSThread detachNewThreadSelector:@selector(runCommand:) toTarget:self @@ -366,7 +350,6 @@ NSString *configSym = PluginSymbolNameConfigure(aType); arg = @[configSym, @1]; - RETAINOBJNORETURN(arg); // detach a new thread [NSThread detachNewThreadSelector:@selector(runCommand:) toTarget:self diff --git a/macosx/PcsxrPluginHandler.m b/macosx/PcsxrPluginHandler.m index 98328a55..b10d47b3 100755 --- a/macosx/PcsxrPluginHandler.m +++ b/macosx/PcsxrPluginHandler.m @@ -8,7 +8,6 @@ #import "PcsxrPluginHandler.h" #import "EmuThread.h" -#import "ARCBridge.h" @implementation PcsxrPluginHandler @@ -17,7 +16,6 @@ static NSArray *utisupport = nil; if (utisupport == nil) { utisupport = @[@"com.codeplex.pcsxr.plugin"]; - RETAINOBJNORETURN(utisupport); } return utisupport; } @@ -85,7 +83,6 @@ NSLocalizedString(@"The installation of the specified plugin failed. Please try again, or make a manual install.", nil), nil, nil, nil); } - RELEASEOBJ(wrapper); } return YES; } diff --git a/macosx/PluginController.m b/macosx/PluginController.m index 27ff6f01..6bb2608e 100755 --- a/macosx/PluginController.m +++ b/macosx/PluginController.m @@ -1,11 +1,10 @@ #import "PluginController.h" #import "PcsxrPlugin.h" #import "PcsxrController.h" -#import "ARCBridge.h" @interface PluginController () -@property (arcstrong) NSArray *plugins; -@property (arcstrong) NSString *defaultKey; +@property (strong) NSArray *plugins; +@property (strong) NSString *defaultKey; @end @implementation PluginController @@ -79,14 +78,4 @@ [self selectPlugin:pluginMenu]; } -#if !__has_feature(objc_arc) -- (void)dealloc -{ - self.plugins = nil; - self.defaultKey = nil; - - [super dealloc]; -} -#endif - @end diff --git a/macosx/PluginList.m b/macosx/PluginList.m index cd15da58..94afcd90 100755 --- a/macosx/PluginList.m +++ b/macosx/PluginList.m @@ -11,10 +11,8 @@ #import "PcsxrPlugin.h" #include "psxcommon.h" #include "plugins.h" -#import "ARCBridge.h" -//NSMutableArray *plugins; -static PluginList __arcweak *sPluginList = nil; +static PluginList __weak *sPluginList = nil; const static int typeList[] = {PSE_LT_GPU, PSE_LT_SPU, PSE_LT_CDR, PSE_LT_PAD, PSE_LT_NET, PSE_LT_SIO1}; @implementation PluginList @@ -55,7 +53,6 @@ const static int typeList[] = {PSE_LT_GPU, PSE_LT_SPU, PSE_LT_CDR, PSE_LT_PAD, P [pluginList addObject:plugin]; if (![self setActivePlugin:plugin forType:typeList[i]]) missingPlugins = YES; - RELEASEOBJ(plugin); } else { missingPlugins = YES; } @@ -72,25 +69,6 @@ const static int typeList[] = {PSE_LT_GPU, PSE_LT_SPU, PSE_LT_CDR, PSE_LT_PAD, P return self; } -#if !__has_feature(objc_arc) -- (void)dealloc -{ - if (sPluginList == self) - sPluginList = nil; - - [activeGpuPlugin release]; - [activeSpuPlugin release]; - [activeCdrPlugin release]; - [activePadPlugin release]; - [activeNetPlugin release]; - [activeSIO1Plugin release]; - - [pluginList release]; - - [super dealloc]; -} -#endif - - (void)refreshPlugins { NSDirectoryEnumerator *dirEnum; @@ -120,7 +98,6 @@ const static int typeList[] = {PSE_LT_GPU, PSE_LT_SPU, PSE_LT_CDR, PSE_LT_PAD, P PcsxrPlugin *plugin = [[PcsxrPlugin alloc] initWithPath:pname]; if (plugin != nil) { [pluginList addObject:plugin]; - RELEASEOBJ(plugin); } } } @@ -235,8 +212,6 @@ const static int typeList[] = {PSE_LT_GPU, PSE_LT_SPU, PSE_LT_CDR, PSE_LT_PAD, P // stop the old plugin and start the new one if (pluginPtr) { [pluginPtr shutdownAs:type]; - //NOTE: We can ignore Clang's "Incorrect Decrement" here - RELEASEOBJ(pluginPtr); } if ([plugin runAs:type] != 0) { @@ -244,22 +219,22 @@ const static int typeList[] = {PSE_LT_GPU, PSE_LT_SPU, PSE_LT_CDR, PSE_LT_PAD, P } switch (type) { case PSE_LT_GPU: - activeGpuPlugin = RETAINOBJ(plugin); + activeGpuPlugin = plugin; break; case PSE_LT_CDR: - activeCdrPlugin = RETAINOBJ(plugin); + activeCdrPlugin = plugin; break; case PSE_LT_SPU: - activeSpuPlugin = RETAINOBJ(plugin); + activeSpuPlugin = plugin; break; case PSE_LT_PAD: - activePadPlugin = RETAINOBJ(plugin); + activePadPlugin = plugin; break; case PSE_LT_NET: - activeNetPlugin = RETAINOBJ(plugin); + activeNetPlugin = plugin; break; case PSE_LT_SIO1: - activeSIO1Plugin = RETAINOBJ(plugin); + activeSIO1Plugin = plugin; break; } diff --git a/macosx/RecentItemsMenu.m b/macosx/RecentItemsMenu.m index 4ee6fddb..73b02e8b 100755 --- a/macosx/RecentItemsMenu.m +++ b/macosx/RecentItemsMenu.m @@ -8,7 +8,6 @@ #import "RecentItemsMenu.h" #import "PcsxrController.h" -#import "ARCBridge.h" @implementation RecentItemsMenu @@ -23,7 +22,6 @@ for (NSURL* url in recentDocuments) { NSMenuItem *tempItem = [self newMenuItem:url]; [self addMenuItem:tempItem atIndex:index]; - RELEASEOBJ(tempItem); index++; } } @@ -32,15 +30,13 @@ { [[NSDocumentController sharedDocumentController] noteNewRecentDocumentURL:documentURL]; - NSMenuItem* item = RETAINOBJ([self findMenuItemByURL:documentURL]); + NSMenuItem* item = [self findMenuItemByURL:documentURL]; if (item != nil) { [self removeItem:item]; [self insertItem:item atIndex:0]; - RELEASEOBJ(item); } else { NSMenuItem *newitem = [self newMenuItem:documentURL]; [self addMenuItem:newitem]; - RELEASEOBJ(newitem); } } @@ -111,7 +107,6 @@ for (NSMenuItem *item in removeItemsArray) { [self removeItem:item]; } - RELEASEOBJ(removeItemsArray); } @end diff --git a/macosx/hotkeys.m b/macosx/hotkeys.m index 066ecc1d..2a619422 100755 --- a/macosx/hotkeys.m +++ b/macosx/hotkeys.m @@ -13,7 +13,6 @@ #include "plugins.h" #include "ExtendedKeys.h" #import "PcsxrController.h" -#import "ARCBridge.h" #define HK_MAX_STATE 10 static id monitor; @@ -127,7 +126,7 @@ void attachHotkeys() { } void detachHotkeys() { - RELEASEOBJ(hotkeys); hotkeys = nil; + hotkeys = nil; [NSEvent removeMonitor:monitor]; [NSEvent removeMonitor:gpuMonitor]; monitor = nil; diff --git a/macosx/main.m b/macosx/main.m index b81e4079..40cf56c6 100755 --- a/macosx/main.m +++ b/macosx/main.m @@ -16,7 +16,6 @@ #include "sio.h" #include <IOKit/pwr_mgt/IOPMLib.h> #import "hotkeys.h" -#import "ARCBridge.h" static inline void RunOnMainThreadSync(dispatch_block_t block) { @@ -161,7 +160,6 @@ void SysMessage(const char *fmt, ...) { va_end(list); NSDictionary *userInfo = [NSDictionary dictionaryWithObject:msg forKey:NSLocalizedFailureReasonErrorKey]; - RELEASEOBJ(msg); RunOnMainThreadSync(^{ [NSApp presentError:[NSError errorWithDomain:@"Unknown Domain" code:-1 userInfo:userInfo]]; @@ -171,7 +169,6 @@ void SysMessage(const char *fmt, ...) { void *SysLoadLibrary(const char *lib) { NSBundle *bundle = [[NSBundle alloc] initWithPath:[[NSFileManager defaultManager] stringWithFileSystemRepresentation:lib length:strlen(lib)]]; if (bundle != nil) { - AUTORELEASEOBJNORETURN(bundle); return dlopen([[bundle executablePath] fileSystemRepresentation], RTLD_LAZY /*RTLD_NOW*/); } return dlopen(lib, RTLD_LAZY); diff --git a/macosx/plugins/Bladesio1/macsrc/PluginConfigController.m b/macosx/plugins/Bladesio1/macsrc/PluginConfigController.m index 3e77c3ec..9d2c075a 100755 --- a/macosx/plugins/Bladesio1/macsrc/PluginConfigController.m +++ b/macosx/plugins/Bladesio1/macsrc/PluginConfigController.m @@ -20,7 +20,6 @@ */ #import "PluginConfigController.h" -#import "ARCBridge.h" #include "typedefs.h" #include "sio1.h" @@ -45,10 +44,9 @@ void AboutDlgProc() if (path) { credits = [[NSAttributedString alloc] initWithPath: path documentAttributes:NULL]; - AUTORELEASEOBJNORETURN(credits); } else { - credits = AUTORELEASEOBJ([[NSAttributedString alloc] initWithString:@""]); + credits = [[NSAttributedString alloc] initWithString:@""]; } // Get Application Icon @@ -68,7 +66,6 @@ void AboutDlgProc() dispatch_async(dispatch_get_main_queue(), ^{ [NSApp orderFrontStandardAboutPanelWithOptions:infoPaneDict]; }); - RELEASEOBJ(infoPaneDict); } static inline void RunOnMainThreadSync(dispatch_block_t block) @@ -193,7 +190,6 @@ void ReadConfig() ReadConfig(); // load from preferences - RELEASEOBJ(keyValues); keyValues = [[defaults dictionaryForKey:PrefsKey] mutableCopy]; [enabledButton setState: [[keyValues objectForKey:kSioEnabled] boolValue] ? NSOnState : NSOffState]; diff --git a/macosx/plugins/DFCdrom/macsrc/PluginConfigController.m b/macosx/plugins/DFCdrom/macsrc/PluginConfigController.m index e33f182d..6ea5d12f 100755 --- a/macosx/plugins/DFCdrom/macsrc/PluginConfigController.m +++ b/macosx/plugins/DFCdrom/macsrc/PluginConfigController.m @@ -20,7 +20,6 @@ */ #import "PluginConfigController.h" -#import "ARCBridge.h" #include "cdr.h" #define APP_ID @"net.pcsxr.DFCdrom" @@ -48,10 +47,9 @@ void AboutDlgProc() if (path) { credits = [[NSAttributedString alloc] initWithPath: path documentAttributes:NULL]; - AUTORELEASEOBJNORETURN(credits); } else { - credits = AUTORELEASEOBJ([[NSAttributedString alloc] initWithString:@""]); + credits = [[NSAttributedString alloc] initWithString:@""]; } // Get Application Icon @@ -71,7 +69,6 @@ void AboutDlgProc() dispatch_async(dispatch_get_main_queue(), ^{ [NSApp orderFrontStandardAboutPanelWithOptions:infoPaneDict]; }); - RELEASEOBJ(infoPaneDict); } void ConfDlgProc() @@ -144,7 +141,6 @@ void ReadConfig() // and set global values accordingly ReadConfig(); - RELEASEOBJ(writeDic); self.keyValues = nil; [self close]; } @@ -172,15 +168,6 @@ void ReadConfig() } } -#if !__has_feature(objc_arc) -- (void)dealloc -{ - self.keyValues = nil; - - [super dealloc]; -} -#endif - - (void)awakeFromNib { } diff --git a/macosx/plugins/DFInput/macsrc/ControllerList.m b/macosx/plugins/DFInput/macsrc/ControllerList.m index a88058bc..ed486314 100755 --- a/macosx/plugins/DFInput/macsrc/ControllerList.m +++ b/macosx/plugins/DFInput/macsrc/ControllerList.m @@ -20,7 +20,6 @@ */ #import "ControllerList.h" -#import "ARCBridge.h" #include "pad.h" #include "cfg.h" @@ -63,7 +62,6 @@ static NSArray *labelText; [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; diff --git a/macosx/plugins/DFInput/macsrc/PadController.m b/macosx/plugins/DFInput/macsrc/PadController.m index 91f0baf0..f667717a 100755 --- a/macosx/plugins/DFInput/macsrc/PadController.m +++ b/macosx/plugins/DFInput/macsrc/PadController.m @@ -21,7 +21,6 @@ #import <Cocoa/Cocoa.h> #import "PadController.h" -#import "ARCBridge.h" #include "pad.h" static inline void RunOnMainThreadSync(dispatch_block_t block) @@ -330,8 +329,6 @@ void SavePADConfig() pad2Dict, kDFPad2, nil] forKey:PrefsKey]; [defaults synchronize]; - RELEASEOBJ(pad1Dict); - RELEASEOBJ(pad2Dict); } void DoAbout() @@ -345,9 +342,8 @@ void DoAbout() if (path) { credits = [[NSAttributedString alloc] initWithPath: path documentAttributes:NULL]; - AUTORELEASEOBJNORETURN(credits); } else { - credits = AUTORELEASEOBJ([[NSAttributedString alloc] initWithString:@""]); + credits = [[NSAttributedString alloc] initWithString:@""]; } // Get Application Icon @@ -367,7 +363,6 @@ void DoAbout() dispatch_async(dispatch_get_main_queue(), ^{ [NSApp orderFrontStandardAboutPanelWithOptions:infoPaneDict]; }); - RELEASEOBJ(infoPaneDict); } long DoConfiguration() diff --git a/macosx/plugins/DFInput/macsrc/PadView.m b/macosx/plugins/DFInput/macsrc/PadView.m index 7cafa4b1..f8936888 100755 --- a/macosx/plugins/DFInput/macsrc/PadView.m +++ b/macosx/plugins/DFInput/macsrc/PadView.m @@ -20,7 +20,6 @@ */ #import "PadView.h" -#import "ARCBridge.h" #include "pad.h" @implementation PadView @@ -34,14 +33,6 @@ return self; } -#if !__has_feature(objc_arc) -- (void)dealloc -{ - [controller release]; - [super dealloc]; -} -#endif - - (void)drawRect:(NSRect)rect { } @@ -80,7 +71,6 @@ #endif [joystickItem setTag:i + 1]; [[deviceMenu menu] addItem:joystickItem]; - RELEASEOBJ(joystickItem); } if (g.cfg.PadDef[which].DevNum >= SDL_NumJoysticks()) { diff --git a/macosx/plugins/DFInput/macsrc/cfgHelper.m b/macosx/plugins/DFInput/macsrc/cfgHelper.m index e15a9a1e..406252fc 100644 --- a/macosx/plugins/DFInput/macsrc/cfgHelper.m +++ b/macosx/plugins/DFInput/macsrc/cfgHelper.m @@ -7,7 +7,6 @@ // #import <Foundation/Foundation.h> -#import "ARCBridge.h" #import "PadController.h" #include "cfg.h" diff --git a/macosx/plugins/DFNet/macsrc/PluginConfigController.m b/macosx/plugins/DFNet/macsrc/PluginConfigController.m index ad186d6d..92ede4c4 100755 --- a/macosx/plugins/DFNet/macsrc/PluginConfigController.m +++ b/macosx/plugins/DFNet/macsrc/PluginConfigController.m @@ -21,7 +21,6 @@ #import "PluginConfigController.h" #include "dfnet.h" -#import "ARCBridge.h" #define kIPADDRKEY @"IP Address" #define kIPPORT @"IP Port" @@ -52,9 +51,8 @@ void AboutDlgProc() if (path) { credits = [[NSAttributedString alloc] initWithPath: path documentAttributes:NULL]; - AUTORELEASEOBJNORETURN(credits); } else { - credits = AUTORELEASEOBJ([[NSAttributedString alloc] initWithString:@""]); + credits = [[NSAttributedString alloc] initWithString:@""]; } // Get Application Icon @@ -73,7 +71,6 @@ void AboutDlgProc() dispatch_async(dispatch_get_main_queue(), ^{ [NSApp orderFrontStandardAboutPanelWithOptions:infoPaneDict]; }); - RELEASEOBJ(infoPaneDict); } void ConfDlgProc() diff --git a/macosx/plugins/DFNet/macsrc/SockDialog.m b/macosx/plugins/DFNet/macsrc/SockDialog.m index 77a09f04..0114f33f 100755 --- a/macosx/plugins/DFNet/macsrc/SockDialog.m +++ b/macosx/plugins/DFNet/macsrc/SockDialog.m @@ -10,7 +10,6 @@ #include "dfnet.h" #import "EmuThread.h" -#import "ARCBridge.h" void SysMessage(const char *fmt, ...) { @@ -81,8 +80,6 @@ void sockDestroyWaitDlg() RunOnMainThreadSync(^{ if (globalSock != nil) { [globalSock close]; - - RELEASEOBJ(globalSock); globalSock = nil; } }); @@ -102,12 +99,4 @@ void sockDestroyWaitDlg() return self; } -#if !__has_feature(objc_arc) --(void)dealloc -{ - - [super dealloc]; -} -#endif - @end diff --git a/macosx/plugins/DFSound/macsrc/NamedSlider.h b/macosx/plugins/DFSound/macsrc/NamedSlider.h index 95ec014c..6a5c869a 100755 --- a/macosx/plugins/DFSound/macsrc/NamedSlider.h +++ b/macosx/plugins/DFSound/macsrc/NamedSlider.h @@ -1,13 +1,12 @@ /* NetSfPeopsSPUPluginNamedSlider */ #import <Cocoa/Cocoa.h> -#import "ARCBridge.h" @interface NamedSlider : NSSlider { NSArray *strings; __unsafe_unretained Class pluginClass; } -@property (arcretain) NSArray *strings; +@property (strong) NSArray *strings; @property (unsafe_unretained) Class pluginClass; @end diff --git a/macosx/plugins/DFSound/macsrc/NamedSlider.m b/macosx/plugins/DFSound/macsrc/NamedSlider.m index 8411481d..90a89eb5 100755 --- a/macosx/plugins/DFSound/macsrc/NamedSlider.m +++ b/macosx/plugins/DFSound/macsrc/NamedSlider.m @@ -4,16 +4,6 @@ @synthesize pluginClass; @synthesize strings; -#if !__has_feature(objc_arc) -- (void)dealloc -{ - self.strings = nil; - self.pluginClass = nil; - - [super dealloc]; -} -#endif - - (NSString *)stringValue { NSInteger index = [self integerValue]; diff --git a/macosx/plugins/DFSound/macsrc/PluginController.m b/macosx/plugins/DFSound/macsrc/PluginController.m index cc6b330a..12a2b3d7 100755 --- a/macosx/plugins/DFSound/macsrc/PluginController.m +++ b/macosx/plugins/DFSound/macsrc/PluginController.m @@ -2,7 +2,6 @@ #include "stdafx.h" #include "externals.h" #include "maccfg.h" -#include "ARCBridge.h" #ifdef ENABLE_NLS #include <libintl.h> @@ -62,9 +61,9 @@ void DoAbout() NSString *path = [bundle pathForResource:@"Credits" ofType:@"rtf"]; NSAttributedString *credits; if (path) { - credits = AUTORELEASEOBJ([[NSAttributedString alloc] initWithPath: path documentAttributes:NULL]); + credits = [[NSAttributedString alloc] initWithPath: path documentAttributes:NULL]; } else { - credits = AUTORELEASEOBJ([[NSAttributedString alloc] initWithString:@""]); + credits = [[NSAttributedString alloc] initWithString:@""]; } // Get Application Icon @@ -84,7 +83,6 @@ void DoAbout() dispatch_async(dispatch_get_main_queue(), ^{ [NSApp orderFrontStandardAboutPanelWithOptions:infoPaneDict]; }); - RELEASEOBJ(infoPaneDict); } long DoConfiguration() diff --git a/macosx/plugins/DFSound/macsrc/SPUPluginController.h b/macosx/plugins/DFSound/macsrc/SPUPluginController.h index c826e58f..d1e6924a 100644 --- a/macosx/plugins/DFSound/macsrc/SPUPluginController.h +++ b/macosx/plugins/DFSound/macsrc/SPUPluginController.h @@ -8,7 +8,6 @@ #import <Cocoa/Cocoa.h> #import "NamedSlider.h" -#import "ARCBridge.h" @interface SPUPluginController : NSWindowController { @@ -23,7 +22,7 @@ NSMutableDictionary *keyValues; } -@property (readwrite, arcretain) NSMutableDictionary *keyValues; +@property (readwrite, strong) NSMutableDictionary *keyValues; - (IBAction)cancel:(id)sender; - (IBAction)ok:(id)sender; - (IBAction)reset:(id)sender; diff --git a/macosx/plugins/DFSound/macsrc/SPUPluginController.m b/macosx/plugins/DFSound/macsrc/SPUPluginController.m index 83598618..84ef2876 100644 --- a/macosx/plugins/DFSound/macsrc/SPUPluginController.m +++ b/macosx/plugins/DFSound/macsrc/SPUPluginController.m @@ -60,13 +60,4 @@ static void FuncNotAvailable(id sel, id sender, SEL theCmd) NotAvailableWarn(nil); } -#if !__has_feature(objc_arc) -- (void)dealloc -{ - self.keyValues = nil; - - [super dealloc]; -} -#endif - @end diff --git a/macosx/plugins/DFXVideo/macsrc/PluginConfigController.h b/macosx/plugins/DFXVideo/macsrc/PluginConfigController.h index 3a8ac98a..e5b3aac0 100755 --- a/macosx/plugins/DFXVideo/macsrc/PluginConfigController.h +++ b/macosx/plugins/DFXVideo/macsrc/PluginConfigController.h @@ -3,7 +3,6 @@ #define PluginConfigController NetSfPeopsSoftGPUPluginConfigController #import <Cocoa/Cocoa.h> -#import "ARCBridge.h" @interface NetSfPeopsSoftGPUPluginConfigController : NSWindowController { @@ -29,8 +28,8 @@ NSMutableDictionary *keyValues; } -@property (arcretain) NSURL *vertexPath; -@property (arcretain) NSURL *fragmentPath; +@property (strong) NSURL *vertexPath; +@property (strong) NSURL *fragmentPath; - (IBAction)cancel:(id)sender; - (IBAction)ok:(id)sender; diff --git a/macosx/plugins/DFXVideo/macsrc/PluginConfigController.m b/macosx/plugins/DFXVideo/macsrc/PluginConfigController.m index 1410de88..d891c74c 100755 --- a/macosx/plugins/DFXVideo/macsrc/PluginConfigController.m +++ b/macosx/plugins/DFXVideo/macsrc/PluginConfigController.m @@ -4,7 +4,6 @@ #include "menu.h" #include "externals.h" #import "SGPUPreferences.h" -#import "ARCBridge.h" #import "PluginGLView.h" #ifdef ENABLE_NLS @@ -54,9 +53,8 @@ void AboutDlgProc() if (path) { credits = [[NSAttributedString alloc] initWithPath: path documentAttributes:NULL]; - AUTORELEASEOBJNORETURN(credits); } else { - credits = AUTORELEASEOBJ([[NSAttributedString alloc] initWithString:@""]); + credits = [[NSAttributedString alloc] initWithString:@""]; } // Get Application Icon @@ -76,7 +74,6 @@ void AboutDlgProc() dispatch_async(dispatch_get_main_queue(), ^{ [NSApp orderFrontStandardAboutPanelWithOptions:infoPaneDict]; }); - RELEASEOBJ(infoPaneDict); } void SoftDlgProc() @@ -287,7 +284,7 @@ void ReadConfig(void) } - (IBAction)selectShader:(id)sender { - NSOpenPanel *openPanel = RETAINOBJ([NSOpenPanel openPanel]); + NSOpenPanel *openPanel = [NSOpenPanel openPanel]; [openPanel setAllowsMultipleSelection:NO]; [openPanel setCanChooseDirectories:NO]; [openPanel setCanChooseFiles:YES]; @@ -299,8 +296,6 @@ void ReadConfig(void) [self setFragmentPathInfo:[openPanel URL]]; } } - - RELEASEOBJ(openPanel); } - (void)loadValues @@ -310,7 +305,6 @@ void ReadConfig(void) ReadConfig(); /* load from preferences */ - RELEASEOBJ(keyValues); keyValues = [[defaults dictionaryForKey:PrefsKey] mutableCopy]; { @@ -349,17 +343,6 @@ void ReadConfig(void) [self toggleShader:shaders]; } -#if !__has_feature(objc_arc) -- (void)dealloc -{ - [vertexPath release]; - [fragmentPath release]; - [keyValues release]; - - [super dealloc]; -} -#endif - @end #import "OSXPlugLocalization.h" diff --git a/macosx/plugins/DFXVideo/macsrc/PluginGLView.m b/macosx/plugins/DFXVideo/macsrc/PluginGLView.m index 778721fb..592d57f2 100755 --- a/macosx/plugins/DFXVideo/macsrc/PluginGLView.m +++ b/macosx/plugins/DFXVideo/macsrc/PluginGLView.m @@ -26,7 +26,6 @@ #undef BOOL #include "gpu.h" #include "swap.h" -#import "ARCBridge.h" #include <time.h> extern time_t tStart; @@ -91,7 +90,6 @@ void BlitScreen16NS(unsigned char * surf,long x,long y) glLock = [[NSLock alloc] init]; if (nil == glLock) { - AUTORELEASEOBJNORETURN(self); return nil; } @@ -121,12 +119,11 @@ void BlitScreen16NS(unsigned char * surf,long x,long y) if (!pixFmt) { NSLog(@"No OpenGL pixel format found!\n"); - AUTORELEASEOBJNORETURN(self); return nil; } } - [self setPixelFormat:AUTORELEASEOBJ(pixFmt)]; + [self setPixelFormat:pixFmt]; /* long swapInterval = 1 ; @@ -179,7 +176,6 @@ void BlitScreen16NS(unsigned char * surf,long x,long y) image_type = GL_UNSIGNED_SHORT_1_5_5_5_REV; image_base = (GLubyte *) calloc(((IMAGE_COUNT * image_width * image_height) / 3) * 4, image_depth >> 3); if (image_base == nil) { - AUTORELEASEOBJNORETURN(self); return nil; } @@ -218,12 +214,6 @@ void BlitScreen16NS(unsigned char * surf,long x,long y) if (image_base) free(image_base); - -#if !__has_feature(objc_arc) - [glLock release]; - - [super dealloc]; -#endif } - (BOOL)isOpaque diff --git a/macosx/plugins/DFXVideo/macsrc/PluginWindowController.m b/macosx/plugins/DFXVideo/macsrc/PluginWindowController.m index a45a00f3..17431fc3 100755 --- a/macosx/plugins/DFXVideo/macsrc/PluginWindowController.m +++ b/macosx/plugins/DFXVideo/macsrc/PluginWindowController.m @@ -19,7 +19,6 @@ #import "PluginWindowController.h" #import "PluginWindow.h" #include "externals.h" -#import "ARCBridge.h" #undef BOOL NSWindow *gameWindow; @@ -63,18 +62,9 @@ NSRect windowFrame; { if (fullWindow) { [fullWindow orderOut:self]; -#if !__has_feature(objc_arc) - - [fullWindow autorelease]; - fullWindow = nil; -#endif } windowFrame = [[self window] frame]; - -#if !__has_feature(objc_arc) - [super dealloc]; -#endif } // forget keyDownEvents @@ -159,7 +149,6 @@ NSRect windowFrame; if (fullWindow) { [fullWindow orderOut:self]; - AUTORELEASEOBJNORETURN(fullWindow); fullWindow = nil; [[glView openGLContext] setView:glView]; @@ -222,7 +211,6 @@ NSRect windowFrame; return NO; } [[NSNotificationCenter defaultCenter] postNotificationName:@"emuWindowDidClose" object:self]; - AUTORELEASEOBJNORETURN(gameController); gameController = nil; gameWindow = nil; diff --git a/macosx/plugins/DFXVideo/macsrc/drawgl.m b/macosx/plugins/DFXVideo/macsrc/drawgl.m index 3f768307..97cdf52d 100755 --- a/macosx/plugins/DFXVideo/macsrc/drawgl.m +++ b/macosx/plugins/DFXVideo/macsrc/drawgl.m @@ -23,7 +23,6 @@ #include "draw.h" #include "gpu.h" #include "menu.h" -#include "ARCBridge.h" //////////////////////////////////////////////////////////////////////////////////// // misc globals @@ -133,7 +132,6 @@ void CloseDisplay(void) { if (gameController) { [gameController close]; - RELEASEOBJ(gameController); gameController = nil; gameWindow = nil; } diff --git a/macosx/plugins/PeopsXgl/macsrc/NetSfPeopsOpenGLPluginConfigController.m b/macosx/plugins/PeopsXgl/macsrc/NetSfPeopsOpenGLPluginConfigController.m index ee625cdd..90043735 100755 --- a/macosx/plugins/PeopsXgl/macsrc/NetSfPeopsOpenGLPluginConfigController.m +++ b/macosx/plugins/PeopsXgl/macsrc/NetSfPeopsOpenGLPluginConfigController.m @@ -11,7 +11,6 @@ #include "menu.h" #include <OpenGL/gl.h> // bah, "externals.h" thinks include files are for wimps; OpenGL header, in fact, is needed #include "externals.h" -#import "ARCBridge.h" #import "PluginGLView.h" #ifdef ENABLE_NLS @@ -59,9 +58,9 @@ void AboutDlgProc() NSString *path = [bundle pathForResource:@"Credits" ofType:@"rtf"]; NSAttributedString *credits; if (path) { - credits = AUTORELEASEOBJ([[NSAttributedString alloc] initWithPath:path documentAttributes:NULL]); + credits = [[NSAttributedString alloc] initWithPath:path documentAttributes:NULL]; } else { - credits = AUTORELEASEOBJ([[NSAttributedString alloc] initWithString:@""]); + credits = [[NSAttributedString alloc] initWithString:@""]; } // Get Application Icon @@ -81,7 +80,6 @@ void AboutDlgProc() dispatch_async(dispatch_get_main_queue(), ^{ [NSApp orderFrontStandardAboutPanelWithOptions:infoPaneDict]; }); - RELEASEOBJ(infoPaneDict); } void DlgProc() @@ -142,7 +140,6 @@ void PrepFactoryDefaultPreferences(void) [tmpDict setObject:NSStringFromSize(NSMakeSize(800, 600)) forKey:kWindowSize]; [defaults setObject:tmpDict forKey:PrefsKey]; [defaults synchronize]; - RELEASEOBJ(tmpDict); } keyValues = nil; @@ -455,15 +452,6 @@ void ReadConfig(void) } } -#if !__has_feature(objc_arc) -- (void)dealloc -{ - self.keyValues = nil; - - [super dealloc]; -} -#endif - @end #import "OSXPlugLocalization.h" diff --git a/macosx/plugins/PeopsXgl/macsrc/PluginGLView.m b/macosx/plugins/PeopsXgl/macsrc/PluginGLView.m index b2ec911a..ec4eb915 100755 --- a/macosx/plugins/PeopsXgl/macsrc/PluginGLView.m +++ b/macosx/plugins/PeopsXgl/macsrc/PluginGLView.m @@ -29,8 +29,6 @@ #include "externals.h" // for PSXDisplay.disable -- should move it elsewhere really #undef BOOL -#import "ARCBridge.h" - @implementation PluginGLView - (BOOL)isOpaque @@ -51,7 +49,6 @@ glLock = [[NSLock alloc] init]; if (nil == glLock) { - AUTORELEASEOBJNORETURN(self); return nil; } @@ -83,12 +80,11 @@ if (!pixFmt) { NSLog(@"No OpenGL pixel format found!\n"); - AUTORELEASEOBJNORETURN(self); return nil; } } - [self setPixelFormat:AUTORELEASEOBJ(pixFmt)]; + [self setPixelFormat:pixFmt]; [[self openGLContext] makeCurrentContext]; @@ -106,10 +102,6 @@ { [[self openGLContext] makeCurrentContext]; // just in case [NSOpenGLContext clearCurrentContext]; -#if !__has_feature(objc_arc) - [glLock release]; - [super dealloc]; -#endif } - (void)reshape // scrolled, moved or resized diff --git a/macosx/plugins/PeopsXgl/macsrc/PluginWindowController.m b/macosx/plugins/PeopsXgl/macsrc/PluginWindowController.m index 92d982c8..e2abff7b 100755 --- a/macosx/plugins/PeopsXgl/macsrc/PluginWindowController.m +++ b/macosx/plugins/PeopsXgl/macsrc/PluginWindowController.m @@ -26,7 +26,6 @@ #include "externals.h" #include "draw.h" // for CreateScanLines() #undef BOOL -#import "ARCBridge.h" // not sure why these aren't class or instance variables... NSWindow *gameWindow; @@ -221,8 +220,6 @@ NSRect FitRectInRect(NSRect source, NSRect destination) [nc removeObserver:self]; windowFrame = [[self window] frame]; // huh? - - SUPERDEALLOC; } // forget keyDownEvents @@ -343,7 +340,6 @@ NSRect FitRectInRect(NSRect source, NSRect destination) - (BOOL)windowShouldClose:(id)sender { [[NSNotificationCenter defaultCenter] postNotificationName:@"emuWindowDidClose" object:self]; - AUTORELEASEOBJNORETURN(gameController); gameController = nil; gameWindow = nil; CGReleaseAllDisplays(); diff --git a/macosx/plugins/PeopsXgl/macsrc/drawgl.m b/macosx/plugins/PeopsXgl/macsrc/drawgl.m index 550b3d72..3218624b 100755 --- a/macosx/plugins/PeopsXgl/macsrc/drawgl.m +++ b/macosx/plugins/PeopsXgl/macsrc/drawgl.m @@ -29,7 +29,6 @@ #include "gpu.h" #include "menu.h" #include "drawgl.h" -#import "ARCBridge.h" //////////////////////////////////////////////////////////////////////////////////// // misc globals @@ -167,7 +166,6 @@ void CloseDisplay(void) { if (gameController) { [gameController close]; - RELEASEOBJ(gameController); gameController = nil; gameWindow = nil; } |
