summaryrefslogtreecommitdiff
path: root/macosx/PluginList.m
diff options
context:
space:
mode:
authorSND\MaddTheSane_cp <SND\MaddTheSane_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97>2011-12-17 20:41:31 +0000
committerSND\MaddTheSane_cp <SND\MaddTheSane_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97>2011-12-17 20:41:31 +0000
commita603862e8da2d061f728a373acb503fa374b8c6b (patch)
treeef5f8956e5b6a2977d7ff9229df4a799bbfd1dd0 /macosx/PluginList.m
parentb6f15852f36e8d017a275bc3727c5dcab1846d29 (diff)
downloadpcsxr-a603862e8da2d061f728a373acb503fa374b8c6b.tar.gz
Multiple plug-in directories support for Mac OS X. It could be better: currently it uses hierarchy with the built-in plug-in path at the bottom and the user plug-in path at the top. I should probably do it by plug-in version.
PlayStation plug-in double-clicked on Mac OS X are now moved to the user directory instead of the App's built-in plug-in directory. the previous method could cause problems if write support wasn't set in PCSXR, such as if it was created from a different user. git-svn-id: https://pcsxr.svn.codeplex.com/svn/pcsxr@73439 e17a0e51-4ae3-4d35-97c3-1a29b211df97
Diffstat (limited to 'macosx/PluginList.m')
-rw-r--r--macosx/PluginList.m30
1 files changed, 16 insertions, 14 deletions
diff --git a/macosx/PluginList.m b/macosx/PluginList.m
index ba006a50..866e2469 100644
--- a/macosx/PluginList.m
+++ b/macosx/PluginList.m
@@ -160,20 +160,22 @@ const static int typeList[5] = {PSE_LT_GPU, PSE_LT_SPU, PSE_LT_CDR, PSE_LT_PAD,
}
}
- // look for new ones in the plugin directory
- dir = [[NSFileManager defaultManager] stringWithFileSystemRepresentation:Config.PluginsDir length:strlen(Config.PluginsDir)];
- dirEnum = [[NSFileManager defaultManager] enumeratorAtPath:dir];
-
- while ((pname = [dirEnum nextObject])) {
- if ([[pname pathExtension] isEqualToString:@"psxplugin"] ||
- [[pname pathExtension] isEqualToString:@"so"]) {
- [dirEnum skipDescendents]; /* don't enumerate this
- directory */
-
- if (![self hasPluginAtPath:pname]) {
- PcsxrPlugin *plugin = [[PcsxrPlugin alloc] initWithPath:pname];
- if (plugin != nil) {
- [pluginList addObject:plugin];
+ for (NSString *plugDir in [PcsxrPlugin pluginsPaths])
+ {
+ // look for new ones in the plugin directory
+ dirEnum = [[NSFileManager defaultManager] enumeratorAtPath:plugDir];
+
+ while ((pname = [dirEnum nextObject])) {
+ if ([[pname pathExtension] isEqualToString:@"psxplugin"] ||
+ [[pname pathExtension] isEqualToString:@"so"]) {
+ [dirEnum skipDescendents]; /* don't enumerate this
+ directory */
+
+ if (![self hasPluginAtPath:pname]) {
+ PcsxrPlugin *plugin = [[PcsxrPlugin alloc] initWithPath:pname];
+ if (plugin != nil) {
+ [pluginList addObject:plugin];
+ }
}
}
}