summaryrefslogtreecommitdiff
path: root/macosx/plugins/DFXVideo/macsrc/PluginGLView.m
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/DFXVideo/macsrc/PluginGLView.m
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/DFXVideo/macsrc/PluginGLView.m')
-rwxr-xr-xmacosx/plugins/DFXVideo/macsrc/PluginGLView.m17
1 files changed, 11 insertions, 6 deletions
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