summaryrefslogtreecommitdiff
path: root/macosx
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
parenta012af37d7bd3a972d2b3fbb7ed09bc8662e91eb (diff)
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')
-rw-r--r--macosx/Pcsxr.xcodeproj/project.pbxproj27
-rw-r--r--macosx/plugins/Common/SDL/src/file/cocoa/SDL_rwopsbundlesupport.m53
-rw-r--r--macosx/plugins/DFCdrom/ARCBridge.h36
-rw-r--r--macosx/plugins/DFCdrom/DFCdrom.xcodeproj/project.pbxproj32
-rwxr-xr-xmacosx/plugins/DFCdrom/macsrc/PluginConfigController.m35
-rw-r--r--macosx/plugins/DFInput/ARCBridge.h36
-rw-r--r--macosx/plugins/DFInput/DFInput.xcodeproj/project.pbxproj30
-rwxr-xr-xmacosx/plugins/DFInput/macsrc/ControllerList.m2
-rwxr-xr-xmacosx/plugins/DFInput/macsrc/PadController.m8
-rwxr-xr-xmacosx/plugins/DFInput/macsrc/PadView.m2
-rwxr-xr-xmacosx/plugins/DFNet/DFNet.xcodeproj/project.pbxproj26
-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
-rw-r--r--macosx/plugins/DFSound/PeopsSPU.xcodeproj/project.pbxproj39
-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
-rw-r--r--macosx/plugins/DFXVideo/ARCBridge.h36
-rw-r--r--macosx/plugins/DFXVideo/PeopsSoftGPU.xcodeproj/project.pbxproj60
-rwxr-xr-xmacosx/plugins/DFXVideo/macsrc/PluginConfigController.m54
-rwxr-xr-xmacosx/plugins/DFXVideo/macsrc/PluginGLView.m17
-rwxr-xr-xmacosx/plugins/DFXVideo/macsrc/PluginWindowController.m11
-rwxr-xr-xmacosx/plugins/DFXVideo/macsrc/drawgl.m3
-rw-r--r--macosx/plugins/PeopsXgl/ARCBridge.h36
-rw-r--r--macosx/plugins/PeopsXgl/PeopsXGL.xcodeproj/project.pbxproj32
-rwxr-xr-xmacosx/plugins/PeopsXgl/macsrc/NetSfPeopsOpenGLPluginConfigController.m51
-rwxr-xr-xmacosx/plugins/PeopsXgl/macsrc/PluginGLView.h2
-rwxr-xr-xmacosx/plugins/PeopsXgl/macsrc/PluginGLView.m11
-rwxr-xr-xmacosx/plugins/PeopsXgl/macsrc/PluginWindowController.m14
-rwxr-xr-xmacosx/plugins/PeopsXgl/macsrc/drawgl.m3
32 files changed, 544 insertions, 211 deletions
diff --git a/macosx/Pcsxr.xcodeproj/project.pbxproj b/macosx/Pcsxr.xcodeproj/project.pbxproj
index e47f93e5..7139274a 100644
--- a/macosx/Pcsxr.xcodeproj/project.pbxproj
+++ b/macosx/Pcsxr.xcodeproj/project.pbxproj
@@ -113,6 +113,13 @@
remoteGlobalIDString = 5599695E13AFCD2900B0216B;
remoteInfo = PeopsAL;
};
+ 5586005E17850CFC00CB3D85 /* PBXContainerItemProxy */ = {
+ isa = PBXContainerItemProxy;
+ containerPortal = 71AD2DC710C356FD00365243 /* PeopsSPU.xcodeproj */;
+ proxyType = 2;
+ remoteGlobalIDString = 554588431783DF39008A7407;
+ remoteInfo = SPUSharedCode;
+ };
559DAC45146BA61400C5DF71 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 71AD2DC710C356FD00365243 /* PeopsSPU.xcodeproj */;
@@ -597,6 +604,7 @@
children = (
71AD2DD110C356FD00365243 /* PeopsSpuSDL.psxplugin */,
28B467F11463D0020083F129 /* PeopsSpuAL.psxplugin */,
+ 5586005F17850CFC00CB3D85 /* libSPUSharedCode.dylib */,
);
name = Products;
sourceTree = "<group>";
@@ -736,6 +744,13 @@
remoteRef = 28B467F01463D0020083F129 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
+ 5586005F17850CFC00CB3D85 /* libSPUSharedCode.dylib */ = {
+ isa = PBXReferenceProxy;
+ fileType = "compiled.mach-o.dylib";
+ path = libSPUSharedCode.dylib;
+ remoteRef = 5586005E17850CFC00CB3D85 /* PBXContainerItemProxy */;
+ sourceTree = BUILT_PRODUCTS_DIR;
+ };
559DACAE146C647E00C5DF71 /* DFNet.psxplugin */ = {
isa = PBXReferenceProxy;
fileType = wrapper.cfbundle;
@@ -1002,12 +1017,12 @@
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PREPROCESSOR_DEFINITIONS = (
PCSXRCORE,
- "$(GCC_PREPROCESSOR_DEFINITIONS_QUOTED_1)",
+ "PCSXR_VERSION=\\\"1.5\\\"",
+ "XA_HACK=1",
"_MACOSX=1",
__MACOSX__,
- DEBUG,
+ "$(inherited)",
);
- GCC_PREPROCESSOR_DEFINITIONS_QUOTED_1 = "PCSXR_VERSION=\\\"1.5\\\" XA_HACK=1";
GCC_WARN_FOUR_CHARACTER_CONSTANTS = NO;
GCC_WARN_UNKNOWN_PRAGMAS = NO;
INFOPLIST_FILE = Info.plist;
@@ -1030,11 +1045,12 @@
GCC_OPTIMIZATION_LEVEL = s;
GCC_PREPROCESSOR_DEFINITIONS = (
PCSXRCORE,
- "$(GCC_PREPROCESSOR_DEFINITIONS_QUOTED_1)",
+ "PCSXR_VERSION=\\\"1.5\\\"",
+ "XA_HACK=1",
"_MACOSX=1",
__MACOSX__,
+ "$(inherited)",
);
- GCC_PREPROCESSOR_DEFINITIONS_QUOTED_1 = "PCSXR_VERSION=\\\"1.5\\\" XA_HACK=1";
GCC_WARN_FOUR_CHARACTER_CONSTANTS = NO;
GCC_WARN_UNKNOWN_PRAGMAS = NO;
INFOPLIST_FILE = Info.plist;
@@ -1058,6 +1074,7 @@
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
DEBUG_INFORMATION_FORMAT = dwarf;
GCC_OPTIMIZATION_LEVEL = 0;
+ GCC_PREPROCESSOR_DEFINITIONS = "DEBUG=1";
GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
GCC_WARN_ABOUT_POINTER_SIGNEDNESS = NO;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
diff --git a/macosx/plugins/Common/SDL/src/file/cocoa/SDL_rwopsbundlesupport.m b/macosx/plugins/Common/SDL/src/file/cocoa/SDL_rwopsbundlesupport.m
index 39b4c0e9..2f69bc9a 100644
--- a/macosx/plugins/Common/SDL/src/file/cocoa/SDL_rwopsbundlesupport.m
+++ b/macosx/plugins/Common/SDL/src/file/cocoa/SDL_rwopsbundlesupport.m
@@ -12,34 +12,31 @@
*/
FILE* SDL_OpenFPFromBundleOrFallback(const char *file, const char *mode)
{
- FILE* fp = NULL;
-
- // If the file mode is writable, skip all the bundle stuff because generally the bundle is read-only.
- if(strcmp("r", mode) && strcmp("rb", mode))
- {
- return fopen(file, mode);
- }
-
- NSAutoreleasePool* autorelease_pool = [[NSAutoreleasePool alloc] init];
-
-
- NSFileManager* file_manager = [NSFileManager defaultManager];
- NSString* resource_path = [[NSBundle mainBundle] resourcePath];
-
- NSString* ns_string_file_component = [file_manager stringWithFileSystemRepresentation:file length:strlen(file)];
-
- NSString* full_path_with_file_to_try = [resource_path stringByAppendingPathComponent:ns_string_file_component];
- if([file_manager fileExistsAtPath:full_path_with_file_to_try])
- {
- fp = fopen([full_path_with_file_to_try fileSystemRepresentation], mode);
- }
- else
- {
- fp = fopen(file, mode);
+ @autoreleasepool {
+ FILE* fp = NULL;
+
+ // If the file mode is writable, skip all the bundle stuff because generally the bundle is read-only.
+ if(strcmp("r", mode) && strcmp("rb", mode))
+ {
+ return fopen(file, mode);
+ }
+
+ NSFileManager* file_manager = [NSFileManager defaultManager];
+ NSString* resource_path = [[NSBundle mainBundle] resourcePath];
+
+ NSString* ns_string_file_component = [file_manager stringWithFileSystemRepresentation:file length:strlen(file)];
+
+ NSString* full_path_with_file_to_try = [resource_path stringByAppendingPathComponent:ns_string_file_component];
+ if([file_manager fileExistsAtPath:full_path_with_file_to_try])
+ {
+ fp = fopen([full_path_with_file_to_try fileSystemRepresentation], mode);
+ }
+ else
+ {
+ fp = fopen(file, mode);
+ }
+
+ return fp;
}
-
- [autorelease_pool drain];
-
- return fp;
}
#endif
diff --git a/macosx/plugins/DFCdrom/ARCBridge.h b/macosx/plugins/DFCdrom/ARCBridge.h
new file mode 100644
index 00000000..ea274b84
--- /dev/null
+++ b/macosx/plugins/DFCdrom/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/DFCdrom/DFCdrom.xcodeproj/project.pbxproj b/macosx/plugins/DFCdrom/DFCdrom.xcodeproj/project.pbxproj
index cc325298..8a48676b 100644
--- a/macosx/plugins/DFCdrom/DFCdrom.xcodeproj/project.pbxproj
+++ b/macosx/plugins/DFCdrom/DFCdrom.xcodeproj/project.pbxproj
@@ -10,6 +10,7 @@
28586CC614651E870082B8EC /* DFCdromPluginConfig.xib in Resources */ = {isa = PBXBuildFile; fileRef = 28586CC414651E870082B8EC /* DFCdromPluginConfig.xib */; };
2BD707180555997500CB5D9B /* IOKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2BD707170555997500CB5D9B /* IOKit.framework */; };
552E4CBA1474737A00FB231F /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = 552E4CBC1474737A00FB231F /* Localizable.strings */; };
+ 5586006E1785137C00CB3D85 /* ARCBridge.h in Headers */ = {isa = PBXBuildFile; fileRef = 5586006D1785137C00CB3D85 /* ARCBridge.h */; };
713DB2E811F113C30001BDD4 /* cdr.c in Sources */ = {isa = PBXBuildFile; fileRef = 713DB2E311F113C30001BDD4 /* cdr.c */; };
713DB2E911F113C30001BDD4 /* cdr.h in Headers */ = {isa = PBXBuildFile; fileRef = 713DB2E411F113C30001BDD4 /* cdr.h */; };
713DB2EB11F113C30001BDD4 /* util.c in Sources */ = {isa = PBXBuildFile; fileRef = 713DB2E611F113C30001BDD4 /* util.c */; };
@@ -30,6 +31,7 @@
28586CC514651E870082B8EC /* English */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = English; path = English.lproj/DFCdromPluginConfig.xib; sourceTree = "<group>"; };
2BD707170555997500CB5D9B /* IOKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = IOKit.framework; path = /System/Library/Frameworks/IOKit.framework; sourceTree = "<absolute>"; };
552E4CBB1474737A00FB231F /* English */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = English; path = English.lproj/Localizable.strings; sourceTree = "<group>"; };
+ 5586006D1785137C00CB3D85 /* ARCBridge.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ARCBridge.h; sourceTree = "<group>"; };
713DB2E311F113C30001BDD4 /* cdr.c */ = {isa = PBXFileReference; fileEncoding = 0; lastKnownFileType = sourcecode.c.c; lineEnding = 2; name = cdr.c; path = ../../../plugins/dfcdrom/cdr.c; sourceTree = SOURCE_ROOT; xcLanguageSpecificationIdentifier = xcode.lang.c; };
713DB2E411F113C30001BDD4 /* cdr.h */ = {isa = PBXFileReference; fileEncoding = 0; lastKnownFileType = sourcecode.c.h; name = cdr.h; path = ../../../plugins/dfcdrom/cdr.h; sourceTree = SOURCE_ROOT; };
713DB2E611F113C30001BDD4 /* util.c */ = {isa = PBXFileReference; fileEncoding = 0; lastKnownFileType = sourcecode.c.c; lineEnding = 0; name = util.c; path = ../../../plugins/dfcdrom/util.c; sourceTree = SOURCE_ROOT; xcLanguageSpecificationIdentifier = xcode.lang.c; };
@@ -123,6 +125,7 @@
71F3C32111F3CCEF007B9F12 /* macsrc */ = {
isa = PBXGroup;
children = (
+ 5586006D1785137C00CB3D85 /* ARCBridge.h */,
71F3C32411F3CD0B007B9F12 /* cdr-macosx.c */,
71F3C32511F3CD0B007B9F12 /* cfg.c */,
71F3C32611F3CD0B007B9F12 /* PluginConfigController.h */,
@@ -140,6 +143,7 @@
files = (
713DB2E911F113C30001BDD4 /* cdr.h in Headers */,
71F3C32A11F3CD0B007B9F12 /* PluginConfigController.h in Headers */,
+ 5586006E1785137C00CB3D85 /* ARCBridge.h in Headers */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -271,24 +275,23 @@
7107359A0FDEED75004AD098 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
+ "CLANG_ENABLE_OBJC_ARC[arch=x86_64]" = YES;
COMBINE_HIDPI_IMAGES = YES;
COPY_PHASE_STRIP = NO;
GCC_DYNAMIC_NO_PIC = NO;
GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
GCC_OPTIMIZATION_LEVEL = 0;
- GCC_PRECOMPILE_PREFIX_HEADER = NO;
GCC_PREPROCESSOR_DEFINITIONS = (
"PCSXRPLUG=DFCdrom",
- "_MACOSX=1",
+ "$(inherited)",
);
GCC_WARN_FOUR_CHARACTER_CONSTANTS = NO;
GCC_WARN_UNKNOWN_PRAGMAS = NO;
INFOPLIST_FILE = Info.plist;
INSTALL_PATH = "$(USER_LIBRARY_DIR)/Playstation Emulator Plugins";
OTHER_LDFLAGS = "";
- PRODUCT_NAME = DFCdrom;
+ PRODUCT_NAME = "$(TARGET_NAME)";
SECTORDER_FLAGS = "";
- SYMROOT = ../../build;
WRAPPER_EXTENSION = psxplugin;
};
name = Debug;
@@ -296,24 +299,23 @@
7107359B0FDEED75004AD098 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
+ "CLANG_ENABLE_OBJC_ARC[arch=x86_64]" = YES;
COMBINE_HIDPI_IMAGES = YES;
COPY_PHASE_STRIP = YES;
GCC_DYNAMIC_NO_PIC = NO;
GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
GCC_OPTIMIZATION_LEVEL = s;
- GCC_PRECOMPILE_PREFIX_HEADER = NO;
GCC_PREPROCESSOR_DEFINITIONS = (
"PCSXRPLUG=DFCdrom",
- "_MACOSX=1",
+ "$(inherited)",
);
GCC_WARN_FOUR_CHARACTER_CONSTANTS = NO;
GCC_WARN_UNKNOWN_PRAGMAS = NO;
INFOPLIST_FILE = Info.plist;
INSTALL_PATH = "$(USER_LIBRARY_DIR)/Playstation Emulator Plugins";
OTHER_LDFLAGS = "";
- PRODUCT_NAME = DFCdrom;
+ PRODUCT_NAME = "$(TARGET_NAME)";
SECTORDER_FLAGS = "";
- SYMROOT = ../../build;
WRAPPER_EXTENSION = psxplugin;
};
name = Release;
@@ -327,8 +329,12 @@
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
+ DEBUG_PREPROCESSOR_DEFINITIONS = "DEBUG=1";
GCC_OPTIMIZATION_LEVEL = 0;
- GCC_PREPROCESSOR_DEFINITIONS = "_MACOSX=1";
+ GCC_PREPROCESSOR_DEFINITIONS = (
+ "_MACOSX=1",
+ "$(DEBUG_PREPROCESSOR_DEFINITIONS)",
+ );
GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES;
@@ -342,7 +348,6 @@
ONLY_ACTIVE_ARCH = YES;
SDKROOT = macosx;
STRIP_INSTALLED_PRODUCT = NO;
- SYMROOT = ../../build;
VALID_ARCHS = "i386 x86_64";
};
name = Debug;
@@ -356,8 +361,12 @@
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
+ DEBUG_PREPROCESSOR_DEFINITIONS = "";
GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
- GCC_PREPROCESSOR_DEFINITIONS = "_MACOSX=1";
+ GCC_PREPROCESSOR_DEFINITIONS = (
+ "_MACOSX=1",
+ "$(DEBUG_PREPROCESSOR_DEFINITIONS)",
+ );
GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES;
@@ -369,7 +378,6 @@
);
MACOSX_DEPLOYMENT_TARGET = 10.6;
SDKROOT = macosx;
- SYMROOT = ../../build;
VALID_ARCHS = "i386 x86_64";
};
name = Release;
diff --git a/macosx/plugins/DFCdrom/macsrc/PluginConfigController.m b/macosx/plugins/DFCdrom/macsrc/PluginConfigController.m
index 5e79fe63..801a47f2 100755
--- a/macosx/plugins/DFCdrom/macsrc/PluginConfigController.m
+++ b/macosx/plugins/DFCdrom/macsrc/PluginConfigController.m
@@ -21,6 +21,7 @@
#import "PluginConfigController.h"
#include "cdr.h"
+#import "ARCBridge.h"
#define APP_ID @"net.pcsxr.DFCdrom"
#define PrefsKey APP_ID @" Settings"
@@ -37,10 +38,12 @@ 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
@@ -79,9 +82,9 @@ void ReadConfig()
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
[defaults registerDefaults:[NSDictionary dictionaryWithObjectsAndKeys:
[NSDictionary dictionaryWithObjectsAndKeys:
- [NSNumber numberWithBool:YES], @"Threaded",
- [NSNumber numberWithInt:64], @"Cache Size",
- [NSNumber numberWithInt:0], @"Speed",
+ @YES, @"Threaded",
+ @64, @"Cache Size",
+ @0, @"Speed",
nil], PrefsKey, nil]];
keyValues = [defaults dictionaryForKey:PrefsKey];
@@ -104,17 +107,17 @@ void ReadConfig()
NSMutableDictionary *writeDic = [NSMutableDictionary dictionaryWithDictionary:keyValues];
- [writeDic setObject:[NSNumber numberWithBool:[Cached intValue]] forKey:@"Threaded"];
- [writeDic setObject:[NSNumber numberWithInt:[CacheSize intValue]] forKey:@"Cache Size"];
+ [writeDic setObject:@((BOOL)[Cached intValue]) forKey:@"Threaded"];
+ [writeDic setObject:@([CacheSize intValue]) forKey:@"Cache Size"];
switch ([CdSpeed indexOfSelectedItem]) {
- case 1: [writeDic setObject:[NSNumber numberWithInt:1] forKey:@"Speed"]; break;
- case 2: [writeDic setObject:[NSNumber numberWithInt:2] forKey:@"Speed"]; break;
- case 3: [writeDic setObject:[NSNumber numberWithInt:4] forKey:@"Speed"]; break;
- case 4: [writeDic setObject:[NSNumber numberWithInt:8] forKey:@"Speed"]; break;
- case 5: [writeDic setObject:[NSNumber numberWithInt:16] forKey:@"Speed"]; break;
- case 6: [writeDic setObject:[NSNumber numberWithInt:32] forKey:@"Speed"]; break;
- default: [writeDic setObject:[NSNumber numberWithInt:0] forKey:@"Speed"]; break;
+ case 1: [writeDic setObject:@1 forKey:@"Speed"]; break;
+ case 2: [writeDic setObject:@2 forKey:@"Speed"]; break;
+ case 3: [writeDic setObject:@4 forKey:@"Speed"]; break;
+ case 4: [writeDic setObject:@8 forKey:@"Speed"]; break;
+ case 5: [writeDic setObject:@16 forKey:@"Speed"]; break;
+ case 6: [writeDic setObject:@32 forKey:@"Speed"]; break;
+ default: [writeDic setObject:@0 forKey:@"Speed"]; break;
}
// write to defaults
@@ -134,7 +137,7 @@ void ReadConfig()
ReadConfig();
// load from preferences
- [keyValues release];
+ RELEASEOBJ(keyValues);
keyValues = [[defaults dictionaryForKey:PrefsKey] mutableCopy];
[Cached setIntValue:[[keyValues objectForKey:@"Threaded"] intValue]];
diff --git a/macosx/plugins/DFInput/ARCBridge.h b/macosx/plugins/DFInput/ARCBridge.h
new file mode 100644
index 00000000..ea274b84
--- /dev/null
+++ b/macosx/plugins/DFInput/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/DFInput/DFInput.xcodeproj/project.pbxproj b/macosx/plugins/DFInput/DFInput.xcodeproj/project.pbxproj
index 8a802875..96b2b3bf 100644
--- a/macosx/plugins/DFInput/DFInput.xcodeproj/project.pbxproj
+++ b/macosx/plugins/DFInput/DFInput.xcodeproj/project.pbxproj
@@ -11,6 +11,7 @@
2B679862069193F300E2BD4F /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2B679860069193F300E2BD4F /* Cocoa.framework */; };
2B679863069193F300E2BD4F /* IOKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2B679861069193F300E2BD4F /* IOKit.framework */; };
552E4CBF1474739200FB231F /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = 552E4CC11474739200FB231F /* Localizable.strings */; };
+ 558600701785138600CB3D85 /* ARCBridge.h in Headers */ = {isa = PBXBuildFile; fileRef = 5586006F1785138600CB3D85 /* ARCBridge.h */; };
71054E211204A49F00AC2CCB /* ForceFeedback.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 71054E201204A49F00AC2CCB /* ForceFeedback.framework */; };
7136F1DA1200E163001973D9 /* ControllerList.h in Headers */ = {isa = PBXBuildFile; fileRef = 71E861A411FF75AC001C1826 /* ControllerList.h */; };
7136F1DB1200E163001973D9 /* ControllerList.m in Sources */ = {isa = PBXBuildFile; fileRef = 71E861A511FF75AC001C1826 /* ControllerList.m */; };
@@ -76,6 +77,7 @@
2B679860069193F300E2BD4F /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = "<absolute>"; };
2B679861069193F300E2BD4F /* IOKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = IOKit.framework; path = /System/Library/Frameworks/IOKit.framework; sourceTree = "<absolute>"; };
552E4CC01474739200FB231F /* English */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = English; path = English.lproj/Localizable.strings; sourceTree = "<group>"; };
+ 5586006F1785138600CB3D85 /* ARCBridge.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ARCBridge.h; sourceTree = "<group>"; };
71054E201204A49F00AC2CCB /* ForceFeedback.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = ForceFeedback.framework; path = /System/Library/Frameworks/ForceFeedback.framework; sourceTree = "<absolute>"; };
7136F51912011BB4001973D9 /* English */ = {isa = PBXFileReference; lastKnownFileType = text.rtf; name = English; path = English.lproj/Credits.rtf; sourceTree = "<group>"; };
714FA82A11FC822A00517F47 /* analog.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; lineEnding = 0; name = analog.c; path = ../../../plugins/dfinput/analog.c; sourceTree = SOURCE_ROOT; xcLanguageSpecificationIdentifier = xcode.lang.c; };
@@ -209,6 +211,7 @@
714FA82911FC820D00517F47 /* macsrc */ = {
isa = PBXGroup;
children = (
+ 5586006F1785138600CB3D85 /* ARCBridge.h */,
71E861A411FF75AC001C1826 /* ControllerList.h */,
71E861A511FF75AC001C1826 /* ControllerList.m */,
71E861A811FF75AC001C1826 /* MappingCell.h */,
@@ -378,6 +381,7 @@
71C7B260130F3904004BF975 /* SDL_systhread_c.h in Headers */,
71C7B261130F3904004BF975 /* SDL_systhread.h in Headers */,
71C7B263130F3904004BF975 /* SDL_thread_c.h in Headers */,
+ 558600701785138600CB3D85 /* ARCBridge.h in Headers */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -524,6 +528,7 @@
71155B0D0FDFA2DE00EC0BC5 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
+ "CLANG_ENABLE_OBJC_ARC[arch=x86_64]" = YES;
COMBINE_HIDPI_IMAGES = YES;
COPY_PHASE_STRIP = NO;
GCC_DYNAMIC_NO_PIC = NO;
@@ -532,8 +537,8 @@
GCC_PRECOMPILE_PREFIX_HEADER = NO;
GCC_PREPROCESSOR_DEFINITIONS = (
"PCSXRPLUG=DFInput",
- "_MACOSX=1",
SDL_AUDIO_DISABLED,
+ "$(inherited)",
);
GCC_WARN_FOUR_CHARACTER_CONSTANTS = NO;
GCC_WARN_UNKNOWN_PRAGMAS = NO;
@@ -544,8 +549,7 @@
INFOPLIST_FILE = Info.plist;
INSTALL_PATH = "$(USER_LIBRARY_DIR)/Playstation Emulator Plugins";
LIBRARY_SEARCH_PATHS = .;
- PRODUCT_NAME = DFInput;
- SYMROOT = ../../build;
+ PRODUCT_NAME = "$(TARGET_NAME)";
WRAPPER_EXTENSION = psxplugin;
};
name = Debug;
@@ -553,6 +557,7 @@
71155B0E0FDFA2DE00EC0BC5 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
+ "CLANG_ENABLE_OBJC_ARC[arch=x86_64]" = YES;
COMBINE_HIDPI_IMAGES = YES;
COPY_PHASE_STRIP = YES;
GCC_DYNAMIC_NO_PIC = NO;
@@ -561,8 +566,8 @@
GCC_PRECOMPILE_PREFIX_HEADER = NO;
GCC_PREPROCESSOR_DEFINITIONS = (
"PCSXRPLUG=DFInput",
- "_MACOSX=1",
SDL_AUDIO_DISABLED,
+ "$(inherited)",
);
GCC_WARN_FOUR_CHARACTER_CONSTANTS = NO;
GCC_WARN_UNKNOWN_PRAGMAS = NO;
@@ -573,8 +578,7 @@
INFOPLIST_FILE = Info.plist;
INSTALL_PATH = "$(USER_LIBRARY_DIR)/Playstation Emulator Plugins";
LIBRARY_SEARCH_PATHS = .;
- PRODUCT_NAME = DFInput;
- SYMROOT = ../../build;
+ PRODUCT_NAME = "$(TARGET_NAME)";
WRAPPER_EXTENSION = psxplugin;
};
name = Release;
@@ -588,8 +592,12 @@
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
+ DEBUG_PREPROCESSOR_DEFINITIONS = "DEBUG=1";
GCC_OPTIMIZATION_LEVEL = 0;
- GCC_PREPROCESSOR_DEFINITIONS = "_MACOSX=1";
+ GCC_PREPROCESSOR_DEFINITIONS = (
+ "_MACOSX=1",
+ "$(DEBUG_PREPROCESSOR_DEFINITIONS)",
+ );
GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES;
@@ -607,7 +615,6 @@
OTHER_CFLAGS = "";
SDKROOT = macosx;
STRIP_INSTALLED_PRODUCT = NO;
- SYMROOT = ../../build;
VALID_ARCHS = "i386 x86_64";
};
name = Debug;
@@ -621,8 +628,12 @@
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
+ DEBUG_PREPROCESSOR_DEFINITIONS = "";
GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
- GCC_PREPROCESSOR_DEFINITIONS = "_MACOSX=1";
+ GCC_PREPROCESSOR_DEFINITIONS = (
+ "_MACOSX=1",
+ "$(DEBUG_PREPROCESSOR_DEFINITIONS)",
+ );
GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES;
@@ -638,7 +649,6 @@
MACOSX_DEPLOYMENT_TARGET = 10.6;
OTHER_CFLAGS = "";
SDKROOT = macosx;
- SYMROOT = ../../build;
VALID_ARCHS = "i386 x86_64";
};
name = Release;
diff --git a/macosx/plugins/DFInput/macsrc/ControllerList.m b/macosx/plugins/DFInput/macsrc/ControllerList.m
index 3a6ec11c..609af2e2 100755
--- a/macosx/plugins/DFInput/macsrc/ControllerList.m
+++ b/macosx/plugins/DFInput/macsrc/ControllerList.m
@@ -33,10 +33,12 @@ static int currentController;
return self;
}
+#if !__has_feature(objc_arc)
- (void)dealloc
{
[super dealloc];
}
+#endif
/* sets current controller data returned by data source */
+ (void)setCurrentController:(int)which
diff --git a/macosx/plugins/DFInput/macsrc/PadController.m b/macosx/plugins/DFInput/macsrc/PadController.m
index 2cc01b7d..e2b28ea9 100755
--- a/macosx/plugins/DFInput/macsrc/PadController.m
+++ b/macosx/plugins/DFInput/macsrc/PadController.m
@@ -22,6 +22,7 @@
#import <Cocoa/Cocoa.h>
#import "PadController.h"
#include "pad.h"
+#import "ARCBridge.h"
static NSWindow *padWindow = nil;
static PadController *padController = nil;
@@ -37,10 +38,11 @@ void DoAbout() {
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/DFInput/macsrc/PadView.m b/macosx/plugins/DFInput/macsrc/PadView.m
index f9da9f09..ea81f9ac 100755
--- a/macosx/plugins/DFInput/macsrc/PadView.m
+++ b/macosx/plugins/DFInput/macsrc/PadView.m
@@ -33,11 +33,13 @@
return self;
}
+#if !__has_feature(objc_arc)
- (void)dealloc
{
[controller release];
[super dealloc];
}
+#endif
- (void)drawRect:(NSRect)rect
{
diff --git a/macosx/plugins/DFNet/DFNet.xcodeproj/project.pbxproj b/macosx/plugins/DFNet/DFNet.xcodeproj/project.pbxproj
index d5d6b8e3..3e0d4984 100755
--- a/macosx/plugins/DFNet/DFNet.xcodeproj/project.pbxproj
+++ b/macosx/plugins/DFNet/DFNet.xcodeproj/project.pbxproj
@@ -13,6 +13,7 @@
55278DBE12C813AC00288CD8 /* dfnet.h in Headers */ = {isa = PBXBuildFile; fileRef = 55278DBB12C813AC00288CD8 /* dfnet.h */; };
55278DC212C8141600288CD8 /* cfg.c in Sources */ = {isa = PBXBuildFile; fileRef = 55278DC112C8141600288CD8 /* cfg.c */; };
55612EC912C965F500BD3D17 /* unix.c in Sources */ = {isa = PBXBuildFile; fileRef = 55278DBC12C813AC00288CD8 /* unix.c */; };
+ 558600731785139C00CB3D85 /* ARCBridge.h in Headers */ = {isa = PBXBuildFile; fileRef = 558600721785139C00CB3D85 /* ARCBridge.h */; };
559DACB3146C64B800C5DF71 /* DFNet.xib in Resources */ = {isa = PBXBuildFile; fileRef = 559DACB1146C64B800C5DF71 /* DFNet.xib */; };
559DACB8146C64D600C5DF71 /* SockDialog.xib in Resources */ = {isa = PBXBuildFile; fileRef = 559DACB6146C64D600C5DF71 /* SockDialog.xib */; };
55F79D6C1475B252007C856E /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = 55F79D6E1475B252007C856E /* Localizable.strings */; };
@@ -33,6 +34,7 @@
55278DBB12C813AC00288CD8 /* dfnet.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = dfnet.h; path = ../../../plugins/dfnet/dfnet.h; sourceTree = SOURCE_ROOT; };
55278DBC12C813AC00288CD8 /* unix.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; lineEnding = 2; name = unix.c; path = ../../../plugins/dfnet/unix.c; sourceTree = SOURCE_ROOT; };
55278DC112C8141600288CD8 /* cfg.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = cfg.c; sourceTree = "<group>"; };
+ 558600721785139C00CB3D85 /* ARCBridge.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ARCBridge.h; sourceTree = "<group>"; };
559DACB2146C64B800C5DF71 /* English */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = English; path = plugins/DFNet/English.lproj/DFNet.xib; sourceTree = "<group>"; };
559DACB7146C64D600C5DF71 /* English */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = English; path = plugins/DFNet/English.lproj/SockDialog.xib; sourceTree = "<group>"; };
55F79D6D1475B252007C856E /* English */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = English; path = English.lproj/Localizable.strings; sourceTree = "<group>"; };
@@ -122,6 +124,7 @@
71F3C32111F3CCEF007B9F12 /* macsrc */ = {
isa = PBXGroup;
children = (
+ 558600721785139C00CB3D85 /* ARCBridge.h */,
55278DC112C8141600288CD8 /* cfg.c */,
71F3C32611F3CD0B007B9F12 /* PluginConfigController.h */,
71F3C32711F3CD0B007B9F12 /* PluginConfigController.m */,
@@ -141,6 +144,7 @@
71F3C32A11F3CD0B007B9F12 /* PluginConfigController.h in Headers */,
55278DBE12C813AC00288CD8 /* dfnet.h in Headers */,
551ED70C130F209C00D19D11 /* SockDialog.h in Headers */,
+ 558600731785139C00CB3D85 /* ARCBridge.h in Headers */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -291,13 +295,13 @@
GCC_PRECOMPILE_PREFIX_HEADER = NO;
GCC_PREPROCESSOR_DEFINITIONS = (
"PCSXRPLUG=DFNet",
- "_MACOSX=1",
+ "$(inherited)",
);
GCC_WARN_FOUR_CHARACTER_CONSTANTS = NO;
GCC_WARN_UNKNOWN_PRAGMAS = NO;
INFOPLIST_FILE = Info.plist;
INSTALL_PATH = "$(USER_LIBRARY_DIR)/Playstation Emulator Plugins";
- PRODUCT_NAME = DFNet;
+ PRODUCT_NAME = "$(TARGET_NAME)";
SYMROOT = ../../build;
WRAPPER_EXTENSION = psxplugin;
};
@@ -314,13 +318,13 @@
GCC_PRECOMPILE_PREFIX_HEADER = NO;
GCC_PREPROCESSOR_DEFINITIONS = (
"PCSXRPLUG=DFNet",
- "_MACOSX=1",
+ "$(inherited)",
);
GCC_WARN_FOUR_CHARACTER_CONSTANTS = NO;
GCC_WARN_UNKNOWN_PRAGMAS = NO;
INFOPLIST_FILE = Info.plist;
INSTALL_PATH = "$(USER_LIBRARY_DIR)/Playstation Emulator Plugins";
- PRODUCT_NAME = DFNet;
+ PRODUCT_NAME = "$(TARGET_NAME)";
SYMROOT = ../../build;
WRAPPER_EXTENSION = psxplugin;
};
@@ -330,8 +334,13 @@
isa = XCBuildConfiguration;
buildSettings = {
ARCHS = "$(ARCHS_STANDARD_32_64_BIT)";
+ "CLANG_ENABLE_OBJC_ARC[arch=x86_64]" = YES;
+ DEBUG_PREPROCESSOR_DEFINITIONS = "DEBUG=1";
GCC_OPTIMIZATION_LEVEL = 0;
- GCC_PREPROCESSOR_DEFINITIONS = "_MACOSX=1";
+ GCC_PREPROCESSOR_DEFINITIONS = (
+ "_MACOSX=1",
+ "$(DEBUG_PREPROCESSOR_DEFINITIONS)",
+ );
HEADER_SEARCH_PATHS = (
../../../libpcsxcore,
../..,
@@ -349,7 +358,12 @@
isa = XCBuildConfiguration;
buildSettings = {
ARCHS = "$(ARCHS_STANDARD_32_64_BIT)";
- GCC_PREPROCESSOR_DEFINITIONS = "_MACOSX=1";
+ "CLANG_ENABLE_OBJC_ARC[arch=x86_64]" = YES;
+ DEBUG_PREPROCESSOR_DEFINITIONS = "";
+ GCC_PREPROCESSOR_DEFINITIONS = (
+ "_MACOSX=1",
+ "$(DEBUG_PREPROCESSOR_DEFINITIONS)",
+ );
HEADER_SEARCH_PATHS = (
../../../libpcsxcore,
../..,
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
diff --git a/macosx/plugins/DFSound/PeopsSPU.xcodeproj/project.pbxproj b/macosx/plugins/DFSound/PeopsSPU.xcodeproj/project.pbxproj
index 0cf94129..6da05601 100644
--- a/macosx/plugins/DFSound/PeopsSPU.xcodeproj/project.pbxproj
+++ b/macosx/plugins/DFSound/PeopsSPU.xcodeproj/project.pbxproj
@@ -27,6 +27,7 @@
554588751783E5FE008A7407 /* NetSfPeopsSpuPluginMain.xib in Resources */ = {isa = PBXBuildFile; fileRef = 5545886E1783E5FE008A7407 /* NetSfPeopsSpuPluginMain.xib */; };
554588781783F2E3008A7407 /* SPUPluginController.h in Headers */ = {isa = PBXBuildFile; fileRef = 554588761783F2E3008A7407 /* SPUPluginController.h */; };
554588791783F2E3008A7407 /* SPUPluginController.m in Sources */ = {isa = PBXBuildFile; fileRef = 554588771783F2E3008A7407 /* SPUPluginController.m */; };
+ 5586006B1785136A00CB3D85 /* ARCBridge.h in Headers */ = {isa = PBXBuildFile; fileRef = 5586006A1785136A00CB3D85 /* ARCBridge.h */; };
5599693C13AFCD2900B0216B /* PluginController.m in Sources */ = {isa = PBXBuildFile; fileRef = 2B7B2B92072D9BE6007F0C35 /* PluginController.m */; };
5599693E13AFCD2900B0216B /* dma.c in Sources */ = {isa = PBXBuildFile; fileRef = 71E4E797109DC529003BB7AC /* dma.c */; };
5599693F13AFCD2900B0216B /* freeze.c in Sources */ = {isa = PBXBuildFile; fileRef = 71E4E79B109DC529003BB7AC /* freeze.c */; };
@@ -129,6 +130,7 @@
5545886F1783E5FE008A7407 /* English */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = English; path = English.lproj/NetSfPeopsSpuPluginMain.xib; sourceTree = "<group>"; };
554588761783F2E3008A7407 /* SPUPluginController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SPUPluginController.h; sourceTree = "<group>"; };
554588771783F2E3008A7407 /* SPUPluginController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SPUPluginController.m; sourceTree = "<group>"; };
+ 5586006A1785136A00CB3D85 /* ARCBridge.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ARCBridge.h; sourceTree = "<group>"; };
5599692713AFCCC600B0216B /* openal.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = openal.c; sourceTree = "<group>"; };
5599695E13AFCD2900B0216B /* PeopsSpuAL.psxplugin */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = PeopsSpuAL.psxplugin; sourceTree = BUILT_PRODUCTS_DIR; };
5599696E13AFCE1D00B0216B /* OpenAL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenAL.framework; path = System/Library/Frameworks/OpenAL.framework; sourceTree = SDKROOT; };
@@ -327,6 +329,7 @@
2B7B2B8E072D9BD6007F0C35 /* macsrc */ = {
isa = PBXGroup;
children = (
+ 5586006A1785136A00CB3D85 /* ARCBridge.h */,
55F36E4B146CA0A900718DE6 /* maccfg.h */,
2B7B2B91072D9BE6007F0C35 /* PluginController.h */,
2B7B2B92072D9BE6007F0C35 /* PluginController.m */,
@@ -505,6 +508,7 @@
files = (
554588551783DF8B008A7407 /* NamedSlider.h in Headers */,
554588781783F2E3008A7407 /* SPUPluginController.h in Headers */,
+ 5586006B1785136A00CB3D85 /* ARCBridge.h in Headers */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -742,6 +746,7 @@
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
+ "CLANG_ENABLE_OBJC_ARC[arch=x86_64]" = YES;
CLANG_WARN_EMPTY_BODY = YES;
COPY_PHASE_STRIP = NO;
DYLIB_COMPATIBILITY_VERSION = 1;
@@ -764,6 +769,7 @@
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
+ "CLANG_ENABLE_OBJC_ARC[arch=x86_64]" = YES;
CLANG_WARN_EMPTY_BODY = YES;
COPY_PHASE_STRIP = YES;
DYLIB_COMPATIBILITY_VERSION = 1;
@@ -788,7 +794,6 @@
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PREPROCESSOR_DEFINITIONS = (
"PCSXRPLUG=ALSound",
- _MACOSX,
USEOPENAL,
"$(inherited)",
);
@@ -799,8 +804,7 @@
INFOPLIST_FILE = "Info-AL.plist";
INSTALL_PATH = "$(USER_LIBRARY_DIR)/Playstation Emulator Plugins";
LD_RUNPATH_SEARCH_PATHS = "@loader_path/../Frameworks";
- PRODUCT_NAME = PeopsSpuAL;
- SYMROOT = ../../build;
+ PRODUCT_NAME = "$(TARGET_NAME)";
WRAPPER_EXTENSION = psxplugin;
};
name = Debug;
@@ -814,7 +818,6 @@
GCC_OPTIMIZATION_LEVEL = s;
GCC_PREPROCESSOR_DEFINITIONS = (
"PCSXRPLUG=ALSound",
- _MACOSX,
USEOPENAL,
"$(inherited)",
);
@@ -825,8 +828,7 @@
INFOPLIST_FILE = "Info-AL.plist";
INSTALL_PATH = "$(USER_LIBRARY_DIR)/Playstation Emulator Plugins";
LD_RUNPATH_SEARCH_PATHS = "@loader_path/../Frameworks";
- PRODUCT_NAME = PeopsSpuAL;
- SYMROOT = ../../build;
+ PRODUCT_NAME = "$(TARGET_NAME)";
WRAPPER_EXTENSION = psxplugin;
};
name = Release;
@@ -841,7 +843,6 @@
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PREPROCESSOR_DEFINITIONS = (
"PCSXRPLUG=SDLSound",
- _MACOSX,
USESDL,
SDL_JOYSTICK_DISABLED,
"$(inherited)",
@@ -854,9 +855,7 @@
INFOPLIST_FILE = "Info-SDL.plist";
INSTALL_PATH = "$(USER_LIBRARY_DIR)/Playstation Emulator Plugins";
LD_RUNPATH_SEARCH_PATHS = "@loader_path/../Frameworks";
- OTHER_LDFLAGS = "-ObjC";
- PRODUCT_NAME = PeopsSpuSDL;
- SYMROOT = ../../build;
+ PRODUCT_NAME = "$(TARGET_NAME)";
WRAPPER_EXTENSION = psxplugin;
};
name = Debug;
@@ -870,7 +869,6 @@
GCC_OPTIMIZATION_LEVEL = s;
GCC_PREPROCESSOR_DEFINITIONS = (
"PCSXRPLUG=SDLSound",
- _MACOSX,
USESDL,
SDL_JOYSTICK_DISABLED,
"$(inherited)",
@@ -883,9 +881,7 @@
INFOPLIST_FILE = "Info-SDL.plist";
INSTALL_PATH = "$(USER_LIBRARY_DIR)/Playstation Emulator Plugins";
LD_RUNPATH_SEARCH_PATHS = "@loader_path/../Frameworks";
- OTHER_LDFLAGS = "-ObjC";
- PRODUCT_NAME = PeopsSpuSDL;
- SYMROOT = ../../build;
+ PRODUCT_NAME = "$(TARGET_NAME)";
WRAPPER_EXTENSION = psxplugin;
};
name = Release;
@@ -894,13 +890,18 @@
isa = XCBuildConfiguration;
buildSettings = {
ARCHS = "$(ARCHS_STANDARD_32_64_BIT)";
+ "CLANG_ENABLE_OBJC_ARC[arch=x86_64]" = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
+ DEBUG_PREPROCESSOR_DEFINITIONS = "DEBUG=1";
GCC_OPTIMIZATION_LEVEL = 0;
- GCC_PREPROCESSOR_DEFINITIONS = "DEBUG=1";
+ GCC_PREPROCESSOR_DEFINITIONS = (
+ "_MACOSX=1",
+ "$(DEBUG_PREPROCESSOR_DEFINITIONS)",
+ );
GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES;
@@ -908,7 +909,6 @@
MACOSX_DEPLOYMENT_TARGET = 10.6;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = macosx;
- SYMROOT = ../../build;
VALID_ARCHS = "i386 x86_64";
};
name = Debug;
@@ -917,19 +917,24 @@
isa = XCBuildConfiguration;
buildSettings = {
ARCHS = "$(ARCHS_STANDARD_32_64_BIT)";
+ "CLANG_ENABLE_OBJC_ARC[arch=x86_64]" = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
+ DEBUG_PREPROCESSOR_DEFINITIONS = "";
GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
+ GCC_PREPROCESSOR_DEFINITIONS = (
+ "_MACOSX=1",
+ "$(DEBUG_PREPROCESSOR_DEFINITIONS)",
+ );
GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
MACOSX_DEPLOYMENT_TARGET = 10.6;
SDKROOT = macosx;
- SYMROOT = ../../build;
VALID_ARCHS = "i386 x86_64";
};
name = Release;
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]];
diff --git a/macosx/plugins/DFXVideo/ARCBridge.h b/macosx/plugins/DFXVideo/ARCBridge.h
new file mode 100644
index 00000000..ea274b84
--- /dev/null
+++ b/macosx/plugins/DFXVideo/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/DFXVideo/PeopsSoftGPU.xcodeproj/project.pbxproj b/macosx/plugins/DFXVideo/PeopsSoftGPU.xcodeproj/project.pbxproj
index 2a5e2fa2..17abfd7e 100644
--- a/macosx/plugins/DFXVideo/PeopsSoftGPU.xcodeproj/project.pbxproj
+++ b/macosx/plugins/DFXVideo/PeopsSoftGPU.xcodeproj/project.pbxproj
@@ -21,6 +21,7 @@
552E4CAE1474730B00FB231F /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = 552E4CB01474730B00FB231F /* Localizable.strings */; };
5555E0C41606839300C0A310 /* gpuPeteOGL2.slf in Resources */ = {isa = PBXBuildFile; fileRef = 5555E0C21606839300C0A310 /* gpuPeteOGL2.slf */; };
5555E0C51606839300C0A310 /* gpuPeteOGL2.slv in Resources */ = {isa = PBXBuildFile; fileRef = 5555E0C31606839300C0A310 /* gpuPeteOGL2.slv */; };
+ 5586006717850E7600CB3D85 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5586006617850E7600CB3D85 /* Cocoa.framework */; };
71E9EC06109F24E700E98D1D /* fps.c in Sources */ = {isa = PBXBuildFile; fileRef = 71E9EBF4109F24E600E98D1D /* fps.c */; };
71E9EC08109F24E700E98D1D /* gpu.c in Sources */ = {isa = PBXBuildFile; fileRef = 71E9EBF6109F24E600E98D1D /* gpu.c */; };
71E9EC0B109F24E700E98D1D /* key.c in Sources */ = {isa = PBXBuildFile; fileRef = 71E9EBF9109F24E600E98D1D /* key.c */; };
@@ -44,7 +45,7 @@
2B959E4306342D32000F2A2D /* OpenGL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGL.framework; path = /System/Library/Frameworks/OpenGL.framework; sourceTree = "<absolute>"; };
2BAF4FC90632967A00DB9A16 /* PluginGLView.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = PluginGLView.h; path = macsrc/PluginGLView.h; sourceTree = SOURCE_ROOT; };
2BAF4FCA0632967A00DB9A16 /* PluginGLView.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; name = PluginGLView.m; path = macsrc/PluginGLView.m; sourceTree = SOURCE_ROOT; };
- 2BAF50930632BB1A00DB9A16 /* PeopsSoftGL.psxplugin */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = PeopsSoftGL.psxplugin; sourceTree = BUILT_PRODUCTS_DIR; };
+ 2BAF50930632BB1A00DB9A16 /* gpuPeopsSoftGL.psxplugin */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = gpuPeopsSoftGL.psxplugin; sourceTree = BUILT_PRODUCTS_DIR; };
2BB260A60777462E00F6854C /* PluginConfigController.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = PluginConfigController.h; path = macsrc/PluginConfigController.h; sourceTree = SOURCE_ROOT; };
2BB260A70777462E00F6854C /* PluginConfigController.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; name = PluginConfigController.m; path = macsrc/PluginConfigController.m; sourceTree = SOURCE_ROOT; };
2BD2E768077AF53E00657C69 /* English */ = {isa = PBXFileReference; lastKnownFileType = text.rtf; name = English; path = English.lproj/Credits.rtf; sourceTree = "<group>"; };
@@ -52,6 +53,11 @@
5555E0C21606839300C0A310 /* gpuPeteOGL2.slf */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = gpuPeteOGL2.slf; sourceTree = "<group>"; };
5555E0C31606839300C0A310 /* gpuPeteOGL2.slv */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = gpuPeteOGL2.slv; sourceTree = "<group>"; };
5555E0CA160695BF00C0A310 /* SGPUPreferences.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = SGPUPreferences.h; path = macsrc/SGPUPreferences.h; sourceTree = "<group>"; };
+ 5586006017850E5800CB3D85 /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = System/Library/Frameworks/AppKit.framework; sourceTree = SDKROOT; };
+ 5586006217850E6C00CB3D85 /* CoreFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreFoundation.framework; path = System/Library/Frameworks/CoreFoundation.framework; sourceTree = SDKROOT; };
+ 5586006317850E6C00CB3D85 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
+ 5586006617850E7600CB3D85 /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = System/Library/Frameworks/Cocoa.framework; sourceTree = SDKROOT; };
+ 5586006C1785137400CB3D85 /* ARCBridge.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ARCBridge.h; sourceTree = "<group>"; };
55D42F0E168D9A7F0027EBF0 /* ExtendedKeys.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = ExtendedKeys.h; path = macsrc/ExtendedKeys.h; sourceTree = "<group>"; };
71E9EBF1109F24E600E98D1D /* cfg.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = cfg.h; path = ../../../plugins/dfxvideo/cfg.h; sourceTree = SOURCE_ROOT; };
71E9EBF2109F24E600E98D1D /* draw.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = draw.h; path = ../../../plugins/dfxvideo/draw.h; sourceTree = SOURCE_ROOT; };
@@ -78,6 +84,7 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
+ 5586006717850E7600CB3D85 /* Cocoa.framework in Frameworks */,
2B959E4406342D32000F2A2D /* OpenGL.framework in Frameworks */,
2BD7C777076E1FAB000F05ED /* GLUT.framework in Frameworks */,
);
@@ -101,8 +108,10 @@
2B3E5A0B062AAC34001D796E /* Frameworks */ = {
isa = PBXGroup;
children = (
+ 5586006617850E7600CB3D85 /* Cocoa.framework */,
2B959E4306342D32000F2A2D /* OpenGL.framework */,
2B51949E06B3D2D200744730 /* GLUT.framework */,
+ 5586006817850E8800CB3D85 /* Additional Frameworks */,
);
name = Frameworks;
sourceTree = "<group>";
@@ -110,7 +119,7 @@
2B3E5A46062AACF3001D796E /* Products */ = {
isa = PBXGroup;
children = (
- 2BAF50930632BB1A00DB9A16 /* PeopsSoftGL.psxplugin */,
+ 2BAF50930632BB1A00DB9A16 /* gpuPeopsSoftGL.psxplugin */,
);
name = Products;
sourceTree = "<group>";
@@ -118,6 +127,7 @@
2BD2E2F40779F50B00657C69 /* macsrc */ = {
isa = PBXGroup;
children = (
+ 5586006C1785137400CB3D85 /* ARCBridge.h */,
55D42F0E168D9A7F0027EBF0 /* ExtendedKeys.h */,
2BB260A60777462E00F6854C /* PluginConfigController.h */,
2BB260A70777462E00F6854C /* PluginConfigController.m */,
@@ -147,6 +157,16 @@
name = Resources;
sourceTree = "<group>";
};
+ 5586006817850E8800CB3D85 /* Additional Frameworks */ = {
+ isa = PBXGroup;
+ children = (
+ 5586006217850E6C00CB3D85 /* CoreFoundation.framework */,
+ 5586006317850E6C00CB3D85 /* Foundation.framework */,
+ 5586006017850E5800CB3D85 /* AppKit.framework */,
+ );
+ name = "Additional Frameworks";
+ sourceTree = "<group>";
+ };
71E9EBF0109F24B600E98D1D /* src */ = {
isa = PBXGroup;
children = (
@@ -189,7 +209,7 @@
);
name = gpuPeopsSoftGL;
productName = gpuPeopsSoftGL;
- productReference = 2BAF50930632BB1A00DB9A16 /* PeopsSoftGL.psxplugin */;
+ productReference = 2BAF50930632BB1A00DB9A16 /* gpuPeopsSoftGL.psxplugin */;
productType = "com.apple.product-type.bundle";
};
/* End PBXNativeTarget section */
@@ -298,6 +318,7 @@
7170842D0FDFD328004F3EB4 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
+ "CLANG_ENABLE_OBJC_ARC[arch=x86_64]" = YES;
COMBINE_HIDPI_IMAGES = YES;
COPY_PHASE_STRIP = NO;
GCC_DYNAMIC_NO_PIC = NO;
@@ -309,6 +330,7 @@
"PCSXRPLUG=SoftGL",
_MACGL,
_DARWIN,
+ "$(inherited)",
);
GCC_WARN_FOUR_CHARACTER_CONSTANTS = NO;
GCC_WARN_UNKNOWN_PRAGMAS = NO;
@@ -316,15 +338,8 @@
INSTALL_PATH = "$(USER_LIBRARY_DIR)/Playstation Emulator Plugins";
OPTIMIZATION_CFLAGS = "-finline-functions -finline-limit=1600 -fno-exceptions -funroll-loops -falign-loops=16 -ffast-math";
OTHER_CFLAGS = "-finline-functions";
- OTHER_LDFLAGS = (
- "-framework",
- Foundation,
- "-framework",
- AppKit,
- );
- PRODUCT_NAME = PeopsSoftGL;
+ PRODUCT_NAME = "$(TARGET_NAME)";
SECTORDER_FLAGS = "";
- SYMROOT = ../../build;
WRAPPER_EXTENSION = psxplugin;
};
name = Debug;
@@ -332,6 +347,7 @@
7170842E0FDFD328004F3EB4 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
+ "CLANG_ENABLE_OBJC_ARC[arch=x86_64]" = YES;
COMBINE_HIDPI_IMAGES = YES;
COPY_PHASE_STRIP = YES;
GCC_DYNAMIC_NO_PIC = NO;
@@ -343,21 +359,15 @@
"PCSXRPLUG=SoftGL",
_MACGL,
_DARWIN,
+ "$(inherited)",
);
GCC_WARN_FOUR_CHARACTER_CONSTANTS = NO;
GCC_WARN_UNKNOWN_PRAGMAS = NO;
INFOPLIST_FILE = Info.plist;
INSTALL_PATH = "$(USER_LIBRARY_DIR)/Playstation Emulator Plugins";
OPTIMIZATION_CFLAGS = "-finline-functions -finline-limit=1600 -fomit-frame-pointer -fno-exceptions -funroll-loops -falign-loops=16 -ffast-math";
- OTHER_LDFLAGS = (
- "-framework",
- Foundation,
- "-framework",
- AppKit,
- );
- PRODUCT_NAME = PeopsSoftGL;
+ PRODUCT_NAME = "$(TARGET_NAME)";
SECTORDER_FLAGS = "";
- SYMROOT = ../../build;
WRAPPER_EXTENSION = psxplugin;
};
name = Release;
@@ -371,7 +381,12 @@
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
+ DEBUG_PREPROCESSOR_DEFINITIONS = "DEBUG=1";
GCC_OPTIMIZATION_LEVEL = 0;
+ GCC_PREPROCESSOR_DEFINITIONS = (
+ "_MACOSX=1",
+ "$(DEBUG_PREPROCESSOR_DEFINITIONS)",
+ );
GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES;
@@ -383,7 +398,6 @@
MACOSX_DEPLOYMENT_TARGET = 10.6;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = macosx;
- SYMROOT = ../../build;
VALID_ARCHS = "i386 x86_64";
};
name = Debug;
@@ -397,7 +411,12 @@
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
+ DEBUG_PREPROCESSOR_DEFINITIONS = "";
GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
+ GCC_PREPROCESSOR_DEFINITIONS = (
+ "_MACOSX=1",
+ "$(DEBUG_PREPROCESSOR_DEFINITIONS)",
+ );
GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES;
@@ -408,7 +427,6 @@
);
MACOSX_DEPLOYMENT_TARGET = 10.6;
SDKROOT = macosx;
- SYMROOT = ../../build;
VALID_ARCHS = "i386 x86_64";
};
name = Release;
diff --git a/macosx/plugins/DFXVideo/macsrc/PluginConfigController.m b/macosx/plugins/DFXVideo/macsrc/PluginConfigController.m
index 83f74540..e4a54e9d 100755
--- a/macosx/plugins/DFXVideo/macsrc/PluginConfigController.m
+++ b/macosx/plugins/DFXVideo/macsrc/PluginConfigController.m
@@ -3,7 +3,8 @@
#include "cfg.h"
#include "menu.h"
#include "externals.h"
-#include "SGPUPreferences.h"
+#import "SGPUPreferences.h"
+#import "ARCBridge.h"
#ifdef ENABLE_NLS
#include <libintl.h>
@@ -52,10 +53,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
@@ -125,18 +127,18 @@ void ReadConfig(void)
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
[defaults registerDefaults:[NSDictionary dictionaryWithObjectsAndKeys:
[NSDictionary dictionaryWithObjectsAndKeys:
- [NSNumber numberWithBool:NO], @"FPS Counter",
- [NSNumber numberWithBool:NO], @"Auto Full Screen",
- [NSNumber numberWithBool:NO], @"Frame Skipping",
- [NSNumber numberWithBool:YES], @"Frame Limit",
- [NSNumber numberWithBool:NO], @"VSync",
- [NSNumber numberWithBool:NO], @"Enable Hacks",
- [NSNumber numberWithInt:1], @"Dither Mode",
- [NSNumber numberWithUnsignedInt:0], @"Hacks",
+ @NO, @"FPS Counter",
+ @NO, @"Auto Full Screen",
+ @NO, @"Frame Skipping",
+ @YES, @"Frame Limit",
+ @NO, @"VSync",
+ @NO, @"Enable Hacks",
+ @1, @"Dither Mode",
+ @((unsigned int)0), @"Hacks",
[[selfBundle URLForResource:@"gpuPeteOGL2" withExtension:@"slv"] bookmarkDataWithOptions:NSURLBookmarkCreationPreferFileIDResolution includingResourceValuesForKeys:nil relativeToURL:nil error:nil], @"VertexShader",
[[selfBundle URLForResource:@"gpuPeteOGL2" withExtension:@"slf"] bookmarkDataWithOptions:NSURLBookmarkCreationPreferFileIDResolution includingResourceValuesForKeys:nil relativeToURL:nil error:nil], @"FragmentShader",
[NSNumber numberWithBool:NO], @"UseShader",
- [NSNumber numberWithInt:4], @"ShaderQuality",
+ @4, @"ShaderQuality",
nil], PrefsKey,
nil]];
@@ -254,24 +256,24 @@ void ReadConfig(void)
}
- (IBAction)selectShader:(id)sender {
- NSOpenPanel *openPanel = [[NSOpenPanel openPanel] retain];
+ NSOpenPanel *openPanel = RETAINOBJ([NSOpenPanel openPanel]);
[openPanel setAllowsMultipleSelection:NO];
[openPanel setCanChooseDirectories:NO];
[openPanel setCanChooseFiles:YES];
if ([openPanel runModal] == NSFileHandlingPanelOKButton)
{
if ([sender tag] == 1) {
- [vertexPath release];
- vertexPath = [[openPanel URL] copy];
+ RELEASEOBJ(vertexPath);
+ vertexPath = RETAINOBJ([openPanel URL]);
[vertexShaderViewablePath setTitleWithMnemonic:[vertexPath path]];
} else {
- [fragmentPath release];
- fragmentPath = [[openPanel URL] copy];
+ RELEASEOBJ(fragmentPath);
+ fragmentPath = RETAINOBJ([openPanel URL]);
[fragmentShaderViewablePath setTitleWithMnemonic:[fragmentPath path]];
}
}
- [openPanel release];
+ RELEASEOBJ(openPanel);
}
- (void)loadValues
@@ -281,7 +283,7 @@ void ReadConfig(void)
ReadConfig();
/* load from preferences */
- [keyValues release];
+ RELEASEOBJ(keyValues);
keyValues = [[defaults dictionaryForKey:PrefsKey] mutableCopy];
{
@@ -299,8 +301,8 @@ void ReadConfig(void)
vertexPath = [selfBundle URLForResource:@"gpuPeteOGL2" withExtension:@"slv"];
fragmentPath = [selfBundle URLForResource:@"gpuPeteOGL2" withExtension:@"slf"];
}
- [vertexPath retain];
- [fragmentPath retain];
+ RETAINOBJNORETURN(vertexPath);
+ RETAINOBJNORETURN(fragmentPath);
}
[fpsCounter setIntValue:[[keyValues objectForKey:@"FPS Counter"] intValue]];
[autoFullScreen setIntValue:[[keyValues objectForKey:@"Auto Full Screen"] intValue]];
@@ -312,8 +314,10 @@ void ReadConfig(void)
[ditherMode selectItemAtIndex:[[keyValues objectForKey:@"Dither Mode"] intValue]];
[shaderQualitySelector selectItemAtIndex:[[keyValues objectForKey:@"ShaderQuality"] intValue] - 1];
- [vertexShaderViewablePath setTitleWithMnemonic:[vertexPath path]];
- [fragmentShaderViewablePath setTitleWithMnemonic:[fragmentPath path]];
+ [vertexShaderViewablePath setTitleWithMnemonic:[vertexPath lastPathComponent]];
+ [vertexShaderViewablePath setToolTip:[vertexPath path]];
+ [fragmentShaderViewablePath setTitleWithMnemonic:[fragmentPath lastPathComponent]];
+ [fragmentShaderViewablePath setToolTip:[fragmentPath path]];
unsigned int hackValues = [[keyValues objectForKey:@"Hacks"] unsignedIntValue];
@@ -335,6 +339,7 @@ void ReadConfig(void)
shadersView = [[shadersView subviews] objectAtIndex:0];
}
+#if !__has_feature(objc_arc)
- (void)dealloc
{
[vertexPath release];
@@ -343,6 +348,7 @@ void ReadConfig(void)
[super dealloc];
}
+#endif
@end
diff --git a/macosx/plugins/DFXVideo/macsrc/PluginGLView.m b/macosx/plugins/DFXVideo/macsrc/PluginGLView.m
index e287c803..ade33fcf 100755
--- a/macosx/plugins/DFXVideo/macsrc/PluginGLView.m
+++ b/macosx/plugins/DFXVideo/macsrc/PluginGLView.m
@@ -26,6 +26,7 @@
#undef BOOL
#include "gpu.h"
#include "swap.h"
+#import "ARCBridge.h"
#include <time.h>
extern time_t tStart;
@@ -90,7 +91,7 @@ void BlitScreen16NS(unsigned char * surf,long x,long y)
glLock = [[NSLock alloc] init];
if (nil == glLock) {
- [self autorelease];
+ AUTORELEASEOBJNORETURN(self);
return nil;
}
@@ -120,12 +121,12 @@ void BlitScreen16NS(unsigned char * surf,long x,long y)
if (!pixFmt) {
NSLog(@"No OpenGL pixel format found!\n");
- [self release];
+ AUTORELEASEOBJNORETURN(self);
return nil;
}
}
- [self setPixelFormat:[pixFmt autorelease]];
+ [self setPixelFormat:AUTORELEASEOBJ(pixFmt)];
/*
long swapInterval = 1 ;
@@ -179,7 +180,7 @@ 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) {
- [self release];
+ AUTORELEASEOBJNORETURN(self);
return nil;
}
@@ -215,12 +216,16 @@ void BlitScreen16NS(unsigned char * surf,long x,long y)
[NSOpenGLContext clearCurrentContext];
[glLock unlock];
- [glLock release];
-
+
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 7bfa656f..47d9a512 100755
--- a/macosx/plugins/DFXVideo/macsrc/PluginWindowController.m
+++ b/macosx/plugins/DFXVideo/macsrc/PluginWindowController.m
@@ -18,8 +18,8 @@
#import "PluginWindowController.h"
#import "PluginWindow.h"
-#import "Carbon/Carbon.h"
#include "externals.h"
+#import "ARCBridge.h"
#undef BOOL
NSWindow *gameWindow;
@@ -63,13 +63,18 @@ 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
@@ -154,7 +159,7 @@ NSRect windowFrame;
if (fullWindow) {
[fullWindow orderOut:self];
- [fullWindow autorelease];
+ AUTORELEASEOBJNORETURN(fullWindow);
fullWindow = nil;
[[glView openGLContext] setView:glView];
@@ -217,7 +222,7 @@ NSRect windowFrame;
return NO;
}
[[NSNotificationCenter defaultCenter] postNotificationName:@"emuWindowDidClose" object:self];
- [gameController autorelease];
+ AUTORELEASEOBJNORETURN(gameController);
gameController = nil;
gameWindow = nil;
diff --git a/macosx/plugins/DFXVideo/macsrc/drawgl.m b/macosx/plugins/DFXVideo/macsrc/drawgl.m
index 5eae22dd..f965817b 100755
--- a/macosx/plugins/DFXVideo/macsrc/drawgl.m
+++ b/macosx/plugins/DFXVideo/macsrc/drawgl.m
@@ -23,6 +23,7 @@
#include "draw.h"
#include "gpu.h"
#include "menu.h"
+#include "ARCBridge.h"
////////////////////////////////////////////////////////////////////////////////////
// misc globals
@@ -132,7 +133,7 @@ void CloseDisplay(void)
{
if (gameController) {
[gameController close];
- [gameController release];
+ RELEASEOBJ(gameController);
gameController = nil;
gameWindow = nil;
}
diff --git a/macosx/plugins/PeopsXgl/ARCBridge.h b/macosx/plugins/PeopsXgl/ARCBridge.h
new file mode 100644
index 00000000..ea274b84
--- /dev/null
+++ b/macosx/plugins/PeopsXgl/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/PeopsXgl/PeopsXGL.xcodeproj/project.pbxproj b/macosx/plugins/PeopsXgl/PeopsXGL.xcodeproj/project.pbxproj
index c6e7770f..37cf76c0 100644
--- a/macosx/plugins/PeopsXgl/PeopsXGL.xcodeproj/project.pbxproj
+++ b/macosx/plugins/PeopsXgl/PeopsXGL.xcodeproj/project.pbxproj
@@ -37,7 +37,7 @@
2B038D2206918AA80082466B /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
2B51949E06B3D2D200744730 /* GLUT.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = GLUT.framework; path = /System/Library/Frameworks/GLUT.framework; sourceTree = "<absolute>"; };
2B959E4306342D32000F2A2D /* OpenGL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGL.framework; path = /System/Library/Frameworks/OpenGL.framework; sourceTree = "<absolute>"; };
- 2BAF50930632BB1A00DB9A16 /* PeopsXGL.psxplugin */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = PeopsXGL.psxplugin; sourceTree = BUILT_PRODUCTS_DIR; };
+ 2BAF50930632BB1A00DB9A16 /* gpuPeopsXGL.psxplugin */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = gpuPeopsXGL.psxplugin; sourceTree = BUILT_PRODUCTS_DIR; };
2BD2E768077AF53E00657C69 /* English */ = {isa = PBXFileReference; lastKnownFileType = text.rtf; name = English; path = English.lproj/Credits.rtf; sourceTree = "<group>"; };
3F31AF6A1302D4B600CBB551 /* drawgl.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; name = drawgl.m; path = macsrc/drawgl.m; sourceTree = SOURCE_ROOT; };
3F31AF6E1302D4B600CBB551 /* PluginGLView.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = PluginGLView.h; path = macsrc/PluginGLView.h; sourceTree = SOURCE_ROOT; };
@@ -68,6 +68,7 @@
3F7F384613079BFD00556C34 /* draw.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = draw.h; path = ../../../plugins/peopsxgl/draw.h; sourceTree = SOURCE_ROOT; };
3F7F384713079BFD00556C34 /* draw.c */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = sourcecode.c.c; lineEnding = 2; name = draw.c; path = ../../../plugins/peopsxgl/draw.c; sourceTree = SOURCE_ROOT; };
552E4CCA1474742F00FB231F /* English */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = English; path = English.lproj/Localizable.strings; sourceTree = "<group>"; };
+ 558600711785139200CB3D85 /* ARCBridge.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ARCBridge.h; sourceTree = "<group>"; };
55D42F10168D9AAE0027EBF0 /* ExtendedKeys.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = ExtendedKeys.h; path = macsrc/ExtendedKeys.h; sourceTree = "<group>"; };
55F36E4A146C9F9900718DE6 /* drawgl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = drawgl.h; path = macsrc/drawgl.h; sourceTree = "<group>"; };
A191B90513F6741300D0971F /* gte_accuracy.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = gte_accuracy.c; path = ../../../plugins/peopsxgl/gte_accuracy.c; sourceTree = SOURCE_ROOT; };
@@ -111,7 +112,7 @@
2B3E5A46062AACF3001D796E /* Products */ = {
isa = PBXGroup;
children = (
- 2BAF50930632BB1A00DB9A16 /* PeopsXGL.psxplugin */,
+ 2BAF50930632BB1A00DB9A16 /* gpuPeopsXGL.psxplugin */,
);
name = Products;
sourceTree = "<group>";
@@ -119,6 +120,7 @@
2BD2E2F40779F50B00657C69 /* macsrc */ = {
isa = PBXGroup;
children = (
+ 558600711785139200CB3D85 /* ARCBridge.h */,
55D42F10168D9AAE0027EBF0 /* ExtendedKeys.h */,
3F7F38021307999800556C34 /* NetSfPeopsOpenGLPluginConfigController.h */,
3F7F38031307999800556C34 /* NetSfPeopsOpenGLPluginConfigController.m */,
@@ -191,7 +193,7 @@
);
name = gpuPeopsXGL;
productName = gpuPeopsSoftGL;
- productReference = 2BAF50930632BB1A00DB9A16 /* PeopsXGL.psxplugin */;
+ productReference = 2BAF50930632BB1A00DB9A16 /* gpuPeopsXGL.psxplugin */;
productType = "com.apple.product-type.bundle";
};
/* End PBXNativeTarget section */
@@ -301,6 +303,7 @@
7170842D0FDFD328004F3EB4 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
+ "CLANG_ENABLE_OBJC_ARC[arch=x86_64]" = YES;
COMBINE_HIDPI_IMAGES = YES;
COPY_PHASE_STRIP = NO;
GCC_DYNAMIC_NO_PIC = NO;
@@ -311,7 +314,7 @@
"PCSXRPLUG=PeopsXGL",
_MACGL,
_DARWIN,
- "_MACOSX=1",
+ "$(inherited)",
);
GCC_WARN_FOUR_CHARACTER_CONSTANTS = NO;
GCC_WARN_UNKNOWN_PRAGMAS = NO;
@@ -325,9 +328,8 @@
"-framework",
AppKit,
);
- PRODUCT_NAME = PeopsXGL;
+ PRODUCT_NAME = "$(TARGET_NAME)";
SECTORDER_FLAGS = "";
- SYMROOT = ../../build;
WRAPPER_EXTENSION = psxplugin;
};
name = Debug;
@@ -335,6 +337,7 @@
7170842E0FDFD328004F3EB4 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
+ "CLANG_ENABLE_OBJC_ARC[arch=x86_64]" = YES;
COMBINE_HIDPI_IMAGES = YES;
COPY_PHASE_STRIP = YES;
GCC_DYNAMIC_NO_PIC = NO;
@@ -345,7 +348,7 @@
"PCSXRPLUG=PeopsXGL",
_MACGL,
_DARWIN,
- "_MACOSX=1",
+ "$(inherited)",
);
GCC_WARN_FOUR_CHARACTER_CONSTANTS = NO;
GCC_WARN_UNKNOWN_PRAGMAS = NO;
@@ -358,9 +361,8 @@
"-framework",
AppKit,
);
- PRODUCT_NAME = PeopsXGL;
+ PRODUCT_NAME = "$(TARGET_NAME)";
SECTORDER_FLAGS = "";
- SYMROOT = ../../build;
WRAPPER_EXTENSION = psxplugin;
};
name = Release;
@@ -374,7 +376,12 @@
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
+ DEBUG_PREPROCESSOR_DEFINITIONS = "DEBUG=1";
GCC_OPTIMIZATION_LEVEL = 0;
+ GCC_PREPROCESSOR_DEFINITIONS = (
+ "_MACOSX=1",
+ "$(DEBUG_PREPROCESSOR_DEFINITIONS)",
+ );
GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
GCC_WARN_ABOUT_POINTER_SIGNEDNESS = NO;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
@@ -387,7 +394,6 @@
MACOSX_DEPLOYMENT_TARGET = 10.6;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = macosx;
- SYMROOT = ../../build;
VALID_ARCHS = "i386 x86_64";
WARNING_CFLAGS = "-Wall";
};
@@ -402,9 +408,14 @@
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
+ DEBUG_PREPROCESSOR_DEFINITIONS = "";
GCC_ENABLE_SSE3_EXTENSIONS = YES;
GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
GCC_OPTIMIZATION_LEVEL = 3;
+ GCC_PREPROCESSOR_DEFINITIONS = (
+ "_MACOSX=1",
+ "$(DEBUG_PREPROCESSOR_DEFINITIONS)",
+ );
GCC_UNROLL_LOOPS = YES;
GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
GCC_WARN_ABOUT_POINTER_SIGNEDNESS = NO;
@@ -418,7 +429,6 @@
MACOSX_DEPLOYMENT_TARGET = 10.6;
OTHER_CFLAGS = "-fomit-frame-pointer";
SDKROOT = macosx;
- SYMROOT = ../../build;
VALID_ARCHS = "i386 x86_64";
WARNING_CFLAGS = "-Wall";
};
diff --git a/macosx/plugins/PeopsXgl/macsrc/NetSfPeopsOpenGLPluginConfigController.m b/macosx/plugins/PeopsXgl/macsrc/NetSfPeopsOpenGLPluginConfigController.m
index 63efc6a0..02c58366 100755
--- a/macosx/plugins/PeopsXgl/macsrc/NetSfPeopsOpenGLPluginConfigController.m
+++ b/macosx/plugins/PeopsXgl/macsrc/NetSfPeopsOpenGLPluginConfigController.m
@@ -11,6 +11,7 @@
#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"
#ifdef ENABLE_NLS
#include <libintl.h>
@@ -59,9 +60,9 @@ void AboutDlgProc()
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
@@ -113,32 +114,32 @@ void PrepFactoryDefaultPreferences(void)
[defaults registerDefaults:[NSDictionary dictionaryWithObjectsAndKeys:
[NSDictionary dictionaryWithObjectsAndKeys:
- [NSNumber numberWithBool:NO], @"FPS Counter",
- [NSNumber numberWithBool:NO], @"Auto Full Screen",
- [NSNumber numberWithBool:NO], @"Frame Skipping",
- [NSNumber numberWithBool:YES], @"Frame Limit",
- [NSNumber numberWithBool:NO], @"VSync",
- [NSNumber numberWithBool:NO], @"Enable Hacks",
- [NSNumber numberWithInt:0], @"Dither Mode",
- [NSNumber numberWithUnsignedInt:0], @"Hacks",
+ @NO, @"FPS Counter",
+ @NO, @"Auto Full Screen",
+ @NO, @"Frame Skipping",
+ @YES, @"Frame Limit",
+ @NO, @"VSync",
+ @NO, @"Enable Hacks",
+ @0, @"Dither Mode",
+ @((unsigned int)0), @"Hacks",
- [NSNumber numberWithBool:YES], @"Proportional Resize",
+ @YES, @"Proportional Resize",
//[NSSize stringWithCString: @"default"], @"Fullscreen Resolution",
- [NSNumber numberWithInt:2], @"Offscreen Drawing Level",
- [NSNumber numberWithInt:0], @"Texture Color Depth Level",
- [NSNumber numberWithInt:0], @"Texture Enhancement Level",
- [NSNumber numberWithInt:0], @"Texture Filter Level",
- [NSNumber numberWithInt:0], @"Frame Buffer Level",
- [NSNumber numberWithBool:NO], @"Draw Scanlines",
+ @2, @"Offscreen Drawing Level",
+ @0, @"Texture Color Depth Level",
+ @0, @"Texture Enhancement Level",
+ @0, @"Texture Filter Level",
+ @0, @"Frame Buffer Level",
+ @NO, @"Draw Scanlines",
// nasty:
[NSArchiver archivedDataWithRootObject: [NSColor colorWithCalibratedRed:0 green:0 blue:0 alpha:0.25]], @"Scanline Color",
- [NSNumber numberWithBool:NO], @"Advanced Blending",
- [NSNumber numberWithBool:NO], @"Opaque Pass",
- [NSNumber numberWithBool:NO], @"Blur",
- [NSNumber numberWithBool:YES], @"Z Mask Clipping",
- [NSNumber numberWithBool:NO], @"Wireframe Mode",
- [NSNumber numberWithBool:YES], @"Emulate mjpeg decoder", // helps remove unsightly vertical line in movies
- [NSNumber numberWithBool:NO], @"Fast mjpeg decoder",
+ @NO, @"Advanced Blending",
+ @NO, @"Opaque Pass",
+ @NO, @"Blur",
+ @YES, @"Z Mask Clipping",
+ @NO, @"Wireframe Mode",
+ @YES, @"Emulate mjpeg decoder", // helps remove unsightly vertical line in movies
+ @NO, @"Fast mjpeg decoder",
nil], PrefsKey, nil]];
}
@@ -291,7 +292,7 @@ void ReadConfig(void)
keyValues = [NSMutableDictionary dictionaryWithDictionary: [[NSUserDefaults standardUserDefaults] dictionaryForKey:PrefsKey]];
NSMutableDictionary *writeDic = [NSMutableDictionary dictionaryWithDictionary:keyValues];
- [writeDic setObject:[NSNumber numberWithUnsignedInt:hackValues] forKey:@"Hacks"];
+ [writeDic setObject:@((unsigned int)hackValues) forKey:@"Hacks"];
// write the preferences with Hacks adjustments
[defaults setObject:writeDic forKey:PrefsKey];
diff --git a/macosx/plugins/PeopsXgl/macsrc/PluginGLView.h b/macosx/plugins/PeopsXgl/macsrc/PluginGLView.h
index 657ac2ad..5964a0c0 100755
--- a/macosx/plugins/PeopsXgl/macsrc/PluginGLView.h
+++ b/macosx/plugins/PeopsXgl/macsrc/PluginGLView.h
@@ -34,13 +34,11 @@
}
-
- (void)swapBuffer; // I wonder what this does ;-)
- (void)clearBuffer:(BOOL)display;
// overrides:
- (id) initWithCoder: (NSCoder *) coder;
-- (void)dealloc;
- (BOOL)isOpaque;
- (BOOL)acceptsFirstResponder;
- (void)reshape;
diff --git a/macosx/plugins/PeopsXgl/macsrc/PluginGLView.m b/macosx/plugins/PeopsXgl/macsrc/PluginGLView.m
index 483a72d3..85aa636e 100755
--- a/macosx/plugins/PeopsXgl/macsrc/PluginGLView.m
+++ b/macosx/plugins/PeopsXgl/macsrc/PluginGLView.m
@@ -29,6 +29,8 @@
#include "externals.h" // for PSXDisplay.disable -- should move it elsewhere really
#undef BOOL
+#import "ARCBridge.h"
+
@implementation PluginGLView
- (BOOL)isOpaque { return YES; }
@@ -44,7 +46,7 @@
glLock = [[NSLock alloc] init];
if (nil == glLock) {
- [self release];
+ AUTORELEASEOBJNORETURN(self);
return nil;
}
@@ -76,12 +78,12 @@
if (!pixFmt) {
NSLog(@"No OpenGL pixel format found!\n");
- [self release];
+ AUTORELEASEOBJNORETURN(self);
return nil;
}
}
- [self setPixelFormat:[pixFmt autorelease]];
+ [self setPixelFormat:AUTORELEASEOBJ(pixFmt)];
[[self openGLContext] makeCurrentContext];
@@ -95,6 +97,7 @@
return self;
}
+#if !__has_feature(objc_arc)
- (void)dealloc
{
[[self openGLContext] makeCurrentContext]; // just in case
@@ -102,7 +105,7 @@
[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 5fc97637..55c27785 100755
--- a/macosx/plugins/PeopsXgl/macsrc/PluginWindowController.m
+++ b/macosx/plugins/PeopsXgl/macsrc/PluginWindowController.m
@@ -26,6 +26,7 @@
#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;
@@ -219,13 +220,12 @@ NSRect FitRectInRect(NSRect source, NSRect destination)
- (void)dealloc
{
- NSNotificationCenter *nc = [NSNotificationCenter defaultCenter];
-
- [nc removeObserver:self];
- windowFrame = [[self window] frame]; // huh?
-
+ NSNotificationCenter *nc = [NSNotificationCenter defaultCenter];
- [super dealloc];
+ [nc removeObserver:self];
+ windowFrame = [[self window] frame]; // huh?
+
+ SUPERDEALLOC;
}
// forget keyDownEvents
@@ -346,7 +346,7 @@ NSRect FitRectInRect(NSRect source, NSRect destination)
- (BOOL)windowShouldClose:(id)sender
{
[[NSNotificationCenter defaultCenter] postNotificationName:@"emuWindowDidClose" object:self];
- [gameController autorelease];
+ AUTORELEASEOBJNORETURN(gameController);
gameController = nil;
gameWindow = nil;
CGReleaseAllDisplays();
diff --git a/macosx/plugins/PeopsXgl/macsrc/drawgl.m b/macosx/plugins/PeopsXgl/macsrc/drawgl.m
index 2ad7b985..953dd239 100755
--- a/macosx/plugins/PeopsXgl/macsrc/drawgl.m
+++ b/macosx/plugins/PeopsXgl/macsrc/drawgl.m
@@ -29,6 +29,7 @@
#include "gpu.h"
#include "menu.h"
#include "drawgl.h"
+#import "ARCBridge.h"
////////////////////////////////////////////////////////////////////////////////////
// misc globals
@@ -170,7 +171,7 @@ void CloseDisplay(void)
{
if (gameController) {
[gameController close];
- [gameController release];
+ RELEASEOBJ(gameController);
gameController = nil;
gameWindow = nil;
}