summaryrefslogtreecommitdiff
path: root/macosx/ConfigurationController.m
diff options
context:
space:
mode:
authorSND\MaddTheSane_cp <SND\MaddTheSane_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97>2013-01-09 01:50:38 +0000
committerSND\MaddTheSane_cp <SND\MaddTheSane_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97>2013-01-09 01:50:38 +0000
commit9af085242bda9ad4da78ef23e9d4ed180aa2c629 (patch)
treec776a5dfefbe475936a461b54d469d244df9de75 /macosx/ConfigurationController.m
parentc5b4bf6974fbfd05b6e75c494d11569756034e36 (diff)
downloadpcsxr-9af085242bda9ad4da78ef23e9d4ed180aa2c629.tar.gz
Use ARC in 64-bit mode on the Mac.
Register when we drag a disc image (or double click) to Pcsxr in the recent menu. Comment out ReleasePlugins() in SysClose: it was causing a pointer to be released twice when you changed a plug-in (specifically, the GPU). Cleaning up the Recent items code. One notable case is only releasing objects we have ownership of (this is pointless in ARC, but necessary in 32-bit code). Had to rewrite -[PluginList setActivePlugin:forType:] because the previous version wasn't ARC-friendly. If we select a disc while the emulator is running, load the disc into the current session. git-svn-id: https://pcsxr.svn.codeplex.com/svn/pcsxr@82136 e17a0e51-4ae3-4d35-97c3-1a29b211df97
Diffstat (limited to 'macosx/ConfigurationController.m')
-rwxr-xr-xmacosx/ConfigurationController.m19
1 files changed, 9 insertions, 10 deletions
diff --git a/macosx/ConfigurationController.m b/macosx/ConfigurationController.m
index 730dfaf8..80c23c38 100755
--- a/macosx/ConfigurationController.m
+++ b/macosx/ConfigurationController.m
@@ -6,6 +6,7 @@
#import "PcsxrMemCardHandler.h"
#include "psxcommon.h"
#include "plugins.h"
+#import "ARCBridge.h"
NSString *memChangeNotifier = @"PcsxrMemoryCardDidChangeNotifier";
@@ -55,8 +56,7 @@ NSString *memChangeNotifier = @"PcsxrMemoryCardDidChangeNotifier";
int tag = [sender tag];
char *mcd;
NSTextField *label;
- NSOpenPanel *openDlg = [NSOpenPanel openPanel];
- [openDlg retain];
+ NSOpenPanel *openDlg = RETAINOBJ([NSOpenPanel openPanel]);
NSString *path;
if (tag == 1) { mcd = Config.Mcd1; label = mcd1Label; }
@@ -77,7 +77,7 @@ NSString *memChangeNotifier = @"PcsxrMemoryCardDidChangeNotifier";
[ConfigurationController setMemoryCard:tag toPath:mcdPath];
}
- [openDlg release];
+ RELEASEOBJ(openDlg);
}
- (IBAction)mcdNewClicked:(id)sender
@@ -85,8 +85,7 @@ NSString *memChangeNotifier = @"PcsxrMemoryCardDidChangeNotifier";
int tag = [sender tag];
char *mcd;
NSTextField *label;
- NSSavePanel *openDlg = [NSSavePanel savePanel];
- [openDlg retain];
+ NSSavePanel *openDlg = RETAINOBJ([NSSavePanel savePanel]);
NSString *path;
if (tag == 1) { mcd = Config.Mcd1; label = mcd1Label; }
@@ -102,13 +101,13 @@ NSString *memChangeNotifier = @"PcsxrMemoryCardDidChangeNotifier";
NSString *mcdPath = [[openDlg URL] path];
//Workaround/kludge to make sure we create a memory card before posting a notification
- strcpy(mcd, [mcdPath fileSystemRepresentation]);
+ strlcpy(mcd, [mcdPath fileSystemRepresentation], MAXPATHLEN);
CreateMcd(mcd);
[ConfigurationController setMemoryCard:tag toPath:mcdPath];
}
- [openDlg release];
+ RELEASEOBJ(openDlg);
}
- (IBAction)setVideoType:(id)sender
@@ -221,12 +220,12 @@ NSString *memChangeNotifier = @"PcsxrMemoryCardDidChangeNotifier";
- (void)dealloc
{
[[NSNotificationCenter defaultCenter] removeObserver:self];
- [checkBoxDefaults release];
+ RELEASEOBJ(checkBoxDefaults);
if (memCardEdit) {
[memCardEdit close];
- [memCardEdit release];
+ RELEASEOBJ(memCardEdit);
}
- [super dealloc];
+ SUPERDEALLOC;
}
- (NSString *)keyForSender:(id)sender