summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSND\MaddTheSane_cp <SND\MaddTheSane_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97>2011-12-18 00:46:51 +0000
committerSND\MaddTheSane_cp <SND\MaddTheSane_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97>2011-12-18 00:46:51 +0000
commit04600f548825368b80c710992f1d88be8788591b (patch)
treea7b53c1c6cd0851284f29607a98cacba8e989cbb
parent7264f33c12473e0c77357cff952056550e5eae76 (diff)
downloadpcsxr-04600f548825368b80c710992f1d88be8788591b.tar.gz
Uncomment out dlclose in SysCloseLibrary.
Load the most recent plug-in with the same file name. git-svn-id: https://pcsxr.svn.codeplex.com/svn/pcsxr@73442 e17a0e51-4ae3-4d35-97c3-1a29b211df97
-rw-r--r--macosx/PcsxrPlugin.m10
-rw-r--r--macosx/main.m2
2 files changed, 10 insertions, 2 deletions
diff --git a/macosx/PcsxrPlugin.m b/macosx/PcsxrPlugin.m
index cc35a1f7..110d0630 100644
--- a/macosx/PcsxrPlugin.m
+++ b/macosx/PcsxrPlugin.m
@@ -98,12 +98,20 @@
pluginRef = nil;
name = nil;
path = [aPath retain];
+ long tempVers = 0;
NSString *goodPath = nil;
for (NSString *plugDir in [PcsxrPlugin pluginsPaths])
{
NSString *fullPath = [plugDir stringByAppendingPathComponent:path];
if ([[NSFileManager defaultManager] fileExistsAtPath:fullPath]) {
- goodPath = fullPath;
+ void *tempHandle = SysLoadLibrary([fullPath fileSystemRepresentation]);
+ PSEgetLibVersion tempLibVersion = SysLoadSym(tempHandle, "PSEgetLibVersion");
+ long tempVers2 = tempLibVersion();
+ if (tempVers <= tempVers2 ){
+ goodPath = fullPath;
+ tempVers = tempVers2;
+ }
+ SysCloseLibrary(tempHandle);
}
}
diff --git a/macosx/main.m b/macosx/main.m
index 56e78d3a..74eb0dec 100644
--- a/macosx/main.m
+++ b/macosx/main.m
@@ -133,7 +133,7 @@ const char *SysLibError() {
}
void SysCloseLibrary(void *lib) {
- //dlclose(lib);
+ dlclose(lib);
}
// Called periodically from the emu thread