diff options
| author | SND\MaddTheSane_cp <SND\MaddTheSane_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97> | 2013-07-04 03:07:44 +0000 |
|---|---|---|
| committer | SND\MaddTheSane_cp <SND\MaddTheSane_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97> | 2013-07-04 03:07:44 +0000 |
| commit | dd7da2fae96b9ba6bdbc28f7b26469373801f21e (patch) | |
| tree | 9faf6aa7f2fa2900dcabc3d88d11e87285693e9b /macosx/plugins/PeopsXgl/macsrc | |
| parent | a012af37d7bd3a972d2b3fbb7ed09bc8662e91eb (diff) | |
| download | pcsxr-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/PeopsXgl/macsrc')
5 files changed, 42 insertions, 39 deletions
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; } |
