summaryrefslogtreecommitdiff
path: root/macosx/PcsxrPlugin.m
diff options
context:
space:
mode:
authorSND\MaddTheSane_cp <SND\MaddTheSane_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97>2012-10-13 20:39:01 +0000
committerSND\MaddTheSane_cp <SND\MaddTheSane_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97>2012-10-13 20:39:01 +0000
commit949b0bc5002cd94dcbf37ef23f6c32d41d62c704 (patch)
treed2ca3afb1b6daa71215e0983d62315f9818e9e19 /macosx/PcsxrPlugin.m
parent221dab875d4756a11ba1418a75a05b8b486968e7 (diff)
downloadpcsxr-949b0bc5002cd94dcbf37ef23f6c32d41d62c704.tar.gz
Fixing naming convention on a Cocoa function.
Fixing string format in a Cocoa string. git-svn-id: https://pcsxr.svn.codeplex.com/svn/pcsxr@80390 e17a0e51-4ae3-4d35-97c3-1a29b211df97
Diffstat (limited to 'macosx/PcsxrPlugin.m')
-rw-r--r--macosx/PcsxrPlugin.m22
1 files changed, 11 insertions, 11 deletions
diff --git a/macosx/PcsxrPlugin.m b/macosx/PcsxrPlugin.m
index b1d5a8e6..7c010ef1 100644
--- a/macosx/PcsxrPlugin.m
+++ b/macosx/PcsxrPlugin.m
@@ -104,7 +104,7 @@
pluginRef = nil;
name = nil;
- path = [aPath retain];
+ path = [aPath copy];
long tempVers = 0;
NSString *goodPath = nil;
for (NSString *plugDir in [PcsxrPlugin pluginsPaths])
@@ -134,10 +134,10 @@
}
pluginRef = SysLoadLibrary([goodPath fileSystemRepresentation]);
- if (pluginRef == nil) {
- [self release];
- return nil;
- }
+ if (pluginRef == nil) {
+ [self release];
+ return nil;
+ }
// TODO: add support for plugins with multiple functionalities???
PSE_getLibType = (PSEgetLibType) SysLoadSym(pluginRef, "PSEgetLibType");
@@ -172,8 +172,7 @@
PSE_getLibVersion = (PSEgetLibVersion) SysLoadSym(pluginRef, "PSEgetLibVersion");
if (SysLibError() == nil) {
version = PSE_getLibVersion();
- }
- else {
+ } else {
version = -1;
}
@@ -226,7 +225,7 @@
return;
}
-- (long)initAs:(int)aType
+- (long)runAs:(int)aType
{
char symbol[255];
long (*init)();
@@ -240,17 +239,18 @@
sprintf(symbol, "%sinit", [[PcsxrPlugin prefixForType:aType] cStringUsingEncoding:NSASCIIStringEncoding]);
init = initArg = SysLoadSym(pluginRef, symbol);
if (SysLibError() == nil) {
- if (aType != PSE_LT_PAD)
+ if (aType != PSE_LT_PAD) {
res = init();
- else
+ } else {
res = initArg(1|2);
+ }
}
if (0 == res) {
active |= aType;
} else {
NSRunCriticalAlertPanel(NSLocalizedString(@"Plugin Initialization Failed!", nil),
- [NSString stringWithFormat:NSLocalizedString(@"Pcsxr failed to initialize the selected %s plugin (error=%i).\nThe plugin might not work with your system.", nil), [PcsxrPlugin prefixForType:aType], res],
+ [NSString stringWithFormat:NSLocalizedString(@"Pcsxr failed to initialize the selected %@ plugin (error=%i).\nThe plugin might not work with your system.", nil), [PcsxrPlugin prefixForType:aType], res],
nil, nil, nil);
}