summaryrefslogtreecommitdiff
path: root/macosx/plugins/DFNet/macsrc
diff options
context:
space:
mode:
authorSND\MaddTheSane_cp <SND\MaddTheSane_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97>2013-07-04 03:07:44 +0000
committerSND\MaddTheSane_cp <SND\MaddTheSane_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97>2013-07-04 03:07:44 +0000
commitdd7da2fae96b9ba6bdbc28f7b26469373801f21e (patch)
tree9faf6aa7f2fa2900dcabc3d88d11e87285693e9b /macosx/plugins/DFNet/macsrc
parenta012af37d7bd3a972d2b3fbb7ed09bc8662e91eb (diff)
downloadpcsxr-dd7da2fae96b9ba6bdbc28f7b26469373801f21e.tar.gz
Make the plug-ins use ARC in 64-bit mode.
Change how the preprocessor macros are managed on OS X. Set the name of the product to the target name. git-svn-id: https://pcsxr.svn.codeplex.com/svn/pcsxr@85795 e17a0e51-4ae3-4d35-97c3-1a29b211df97
Diffstat (limited to 'macosx/plugins/DFNet/macsrc')
-rw-r--r--macosx/plugins/DFNet/macsrc/ARCBridge.h36
-rwxr-xr-xmacosx/plugins/DFNet/macsrc/PluginConfigController.m8
-rwxr-xr-xmacosx/plugins/DFNet/macsrc/SockDialog.m6
3 files changed, 46 insertions, 4 deletions
diff --git a/macosx/plugins/DFNet/macsrc/ARCBridge.h b/macosx/plugins/DFNet/macsrc/ARCBridge.h
new file mode 100644
index 00000000..ea274b84
--- /dev/null
+++ b/macosx/plugins/DFNet/macsrc/ARCBridge.h
@@ -0,0 +1,36 @@
+//
+// 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
+
+#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
+
+#endif
+
+#endif
diff --git a/macosx/plugins/DFNet/macsrc/PluginConfigController.m b/macosx/plugins/DFNet/macsrc/PluginConfigController.m
index 063e83e6..ddd3e8c7 100755
--- a/macosx/plugins/DFNet/macsrc/PluginConfigController.m
+++ b/macosx/plugins/DFNet/macsrc/PluginConfigController.m
@@ -21,6 +21,7 @@
#import "PluginConfigController.h"
#include "dfnet.h"
+#import "ARCBridge.h"
NSString * const kIPADDRKEY = @"IP Address";
NSString * const kIPPORT = @"IP Port";
@@ -41,10 +42,11 @@ void AboutDlgProc()
NSString *path = [bundle pathForResource:@"Credits" ofType:@"rtf"];
NSAttributedString *credits;
if (path) {
- credits = [[[NSAttributedString alloc] initWithPath: path
- documentAttributes:NULL] autorelease];
+ credits = [[NSAttributedString alloc] initWithPath: path
+ documentAttributes:NULL];
+ AUTORELEASEOBJNORETURN(credits);
} else {
- credits = [[[NSAttributedString alloc] initWithString:@""] autorelease];
+ credits = AUTORELEASEOBJ([[NSAttributedString alloc] initWithString:@""]);
}
// Get Application Icon
diff --git a/macosx/plugins/DFNet/macsrc/SockDialog.m b/macosx/plugins/DFNet/macsrc/SockDialog.m
index feee77d8..f175e7fa 100755
--- a/macosx/plugins/DFNet/macsrc/SockDialog.m
+++ b/macosx/plugins/DFNet/macsrc/SockDialog.m
@@ -10,6 +10,7 @@
#include "dfnet.h"
#import "EmuThread.h"
+#import "ARCBridge.h"
void SysMessage(const char *fmt, ...)
{
@@ -72,7 +73,8 @@ void sockDestroyWaitDlg()
dispatch_sync(dispatch_get_main_queue(), ^{
if (globalSock != nil) {
[globalSock close];
- [globalSock release];
+
+ RELEASEOBJ(globalSock);
globalSock = nil;
}
});
@@ -92,10 +94,12 @@ void sockDestroyWaitDlg()
return self;
}
+#if !__has_feature(objc_arc)
-(void)dealloc
{
[super dealloc];
}
+#endif
@end