From dd7da2fae96b9ba6bdbc28f7b26469373801f21e Mon Sep 17 00:00:00 2001 From: "SND\\MaddTheSane_cp" Date: Thu, 4 Jul 2013 03:07:44 +0000 Subject: 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 --- macosx/plugins/DFXVideo/macsrc/PluginGLView.m | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) (limited to 'macosx/plugins/DFXVideo/macsrc/PluginGLView.m') 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 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 -- cgit v1.2.3