summaryrefslogtreecommitdiff
path: root/macosx/plugins/DFSound/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/DFSound/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/DFSound/macsrc')
-rw-r--r--macosx/plugins/DFSound/macsrc/ARCBridge.h36
-rwxr-xr-xmacosx/plugins/DFSound/macsrc/NamedSlider.h4
-rwxr-xr-xmacosx/plugins/DFSound/macsrc/NamedSlider.m2
-rwxr-xr-xmacosx/plugins/DFSound/macsrc/PluginController.m7
4 files changed, 44 insertions, 5 deletions
diff --git a/macosx/plugins/DFSound/macsrc/ARCBridge.h b/macosx/plugins/DFSound/macsrc/ARCBridge.h
new file mode 100644
index 00000000..ea274b84
--- /dev/null
+++ b/macosx/plugins/DFSound/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/DFSound/macsrc/NamedSlider.h b/macosx/plugins/DFSound/macsrc/NamedSlider.h
index 790db09a..1dcfe3a3 100755
--- a/macosx/plugins/DFSound/macsrc/NamedSlider.h
+++ b/macosx/plugins/DFSound/macsrc/NamedSlider.h
@@ -5,8 +5,8 @@
@interface NamedSlider : NSSlider
{
NSArray *strings;
- Class pluginClass;
+ __unsafe_unretained Class pluginClass;
}
@property (retain) NSArray *strings;
-@property Class pluginClass;
+@property (unsafe_unretained) Class pluginClass;
@end
diff --git a/macosx/plugins/DFSound/macsrc/NamedSlider.m b/macosx/plugins/DFSound/macsrc/NamedSlider.m
index 750d0376..55322742 100755
--- a/macosx/plugins/DFSound/macsrc/NamedSlider.m
+++ b/macosx/plugins/DFSound/macsrc/NamedSlider.m
@@ -3,12 +3,14 @@
@implementation NamedSlider
@synthesize pluginClass;
+#if !__has_feature(objc_arc)
- (void)dealloc
{
self.strings = nil;
[super dealloc];
}
+#endif
@synthesize strings;
diff --git a/macosx/plugins/DFSound/macsrc/PluginController.m b/macosx/plugins/DFSound/macsrc/PluginController.m
index 655f479e..da05222b 100755
--- a/macosx/plugins/DFSound/macsrc/PluginController.m
+++ b/macosx/plugins/DFSound/macsrc/PluginController.m
@@ -2,6 +2,7 @@
#include "stdafx.h"
#include "externals.h"
#include "maccfg.h"
+#include "ARCBridge.h"
#ifdef ENABLE_NLS
#include <libintl.h>
@@ -54,9 +55,9 @@ void DoAbout()
NSString *path = [bundle pathForResource:@"Credits" ofType:@"rtf"];
NSAttributedString *credits;
if (path) {
- credits = [[[NSAttributedString alloc] initWithPath: path documentAttributes:NULL] autorelease];
+ credits = AUTORELEASEOBJ([[NSAttributedString alloc] initWithPath: path documentAttributes:NULL]);
} else {
- credits = [[[NSAttributedString alloc] initWithString:@""] autorelease];
+ credits = AUTORELEASEOBJ([[NSAttributedString alloc] initWithString:@""]);
}
// Get Application Icon
@@ -168,7 +169,7 @@ void ReadConfig(void)
ReadConfig();
/* load from preferences */
- [keyValues release];
+ RELEASEOBJ(keyValues);
keyValues = [[defaults dictionaryForKey:PrefsKey] mutableCopy];
[hiCompBox setIntValue:[[keyValues objectForKey:@"High Compatibility Mode"] boolValue]];