summaryrefslogtreecommitdiff
path: root/macosx/PcsxrPlugin.m
diff options
context:
space:
mode:
authorSND\MaddTheSane_cp <SND\MaddTheSane_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97>2013-08-15 18:42:18 +0000
committerSND\MaddTheSane_cp <SND\MaddTheSane_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97>2013-08-15 18:42:18 +0000
commitc69572dc23f70fcf72d5ed49729de8f6d4abed0a (patch)
treed897cd07dadba1613f2b379708bbdb7650b96041 /macosx/PcsxrPlugin.m
parent78381253676f85d9f78124e740fdde230e20ac60 (diff)
downloadpcsxr-c69572dc23f70fcf72d5ed49729de8f6d4abed0a.tar.gz
Work on the cheat handling on OS X.
I misunderstood what the LoadCheats command did. git-svn-id: https://pcsxr.svn.codeplex.com/svn/pcsxr@86676 e17a0e51-4ae3-4d35-97c3-1a29b211df97
Diffstat (limited to 'macosx/PcsxrPlugin.m')
-rwxr-xr-xmacosx/PcsxrPlugin.m9
1 files changed, 9 insertions, 0 deletions
diff --git a/macosx/PcsxrPlugin.m b/macosx/PcsxrPlugin.m
index de11f378..e64ce9ce 100755
--- a/macosx/PcsxrPlugin.m
+++ b/macosx/PcsxrPlugin.m
@@ -290,8 +290,17 @@
NSRunCriticalAlertPanel(NSLocalizedString(@"Plugin Initialization Failed!", nil),
NSLocalizedString(@"Pcsxr failed to initialize the selected %@ plugin (error=%i).\nThe plugin might not work with your system.", nil),
nil, nil, nil, [PcsxrPlugin prefixForType:aType], res);
+ return res;
}
+ //Prevent a memory leak.
+ long (*shutdown)(void);
+ shutdown = SysLoadSym(pluginRef, [PluginSymbolName(aType, @"shutdown")
+ cStringUsingEncoding:NSASCIIStringEncoding]);
+ if (SysLibError() == nil) {
+ shutdown();
+ }
+
return res;
}