summaryrefslogtreecommitdiff
path: root/macosx/PluginList.m
diff options
context:
space:
mode:
authorSND\edgbla_cp <SND\edgbla_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97>2011-11-09 20:49:54 +0000
committerSND\edgbla_cp <SND\edgbla_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97>2011-11-09 20:49:54 +0000
commit4d55a8b8254dff61fdc7b1959f6aef7eafbd9439 (patch)
treefb5e56131a7c8b729641c70e7a87883ebaea5186 /macosx/PluginList.m
parent71d6c56271e2650b1a2f5149521a5b1896084710 (diff)
downloadpcsxr-4d55a8b8254dff61fdc7b1959f6aef7eafbd9439.tar.gz
Patch 10767 (Durandal_1707).
git-svn-id: https://pcsxr.svn.codeplex.com/svn/pcsxr@72138 e17a0e51-4ae3-4d35-97c3-1a29b211df97
Diffstat (limited to 'macosx/PluginList.m')
-rw-r--r--macosx/PluginList.m18
1 files changed, 9 insertions, 9 deletions
diff --git a/macosx/PluginList.m b/macosx/PluginList.m
index 3df8ea4d..53422b49 100644
--- a/macosx/PluginList.m
+++ b/macosx/PluginList.m
@@ -35,7 +35,7 @@ const static int typeList[4] = {PSE_LT_GPU, PSE_LT_SPU, PSE_LT_CDR, PSE_LT_PAD};
plugins = [[NSMutableArray alloc] initWithCapacity: 20];
- dir = [NSString stringWithCString:Config.PluginsDir];
+ dir = [[NSFileManager defaultManager] stringWithFileSystemRepresentation:Config.PluginsDir length:strlen(Config.PluginsDir)];
dirEnum = [[NSFileManager defaultManager] enumeratorAtPath:dir];
while (pname = [dirEnum nextObject]) {
@@ -87,7 +87,7 @@ const static int typeList[4] = {PSE_LT_GPU, PSE_LT_SPU, PSE_LT_CDR, PSE_LT_PAD};
- (id)init
{
- int i;
+ NSUInteger i;
if (!(self = [super init]))
return nil;
@@ -98,7 +98,7 @@ const static int typeList[4] = {PSE_LT_GPU, PSE_LT_SPU, PSE_LT_CDR, PSE_LT_PAD};
activeGpuPlugin = activeSpuPlugin = activeCdrPlugin = activePadPlugin = nil;
missingPlugins = NO;
- for (i=0; i<sizeof(*typeList); i++) {
+ for (i = 0; i < sizeof(*typeList); i++) {
NSString *path = [defaults stringForKey:[PcsxrPlugin getDefaultKeyForType:typeList[i]]];
if (nil == path) {
missingPlugins = YES;
@@ -147,7 +147,7 @@ const static int typeList[4] = {PSE_LT_GPU, PSE_LT_SPU, PSE_LT_CDR, PSE_LT_PAD};
{
NSDirectoryEnumerator *dirEnum;
NSString *pname, *dir;
- int i;
+ NSUInteger i;
// verify that the ones that are in list still works
for (i=0; i<[pluginList count]; i++) {
@@ -157,10 +157,10 @@ const static int typeList[4] = {PSE_LT_GPU, PSE_LT_SPU, PSE_LT_CDR, PSE_LT_PAD};
}
// look for new ones in the plugin directory
- dir = [NSString stringWithCString:Config.PluginsDir];
+ dir = [[NSFileManager defaultManager] stringWithFileSystemRepresentation:Config.PluginsDir length:strlen(Config.PluginsDir)];
dirEnum = [[NSFileManager defaultManager] enumeratorAtPath:dir];
- while (pname = [dirEnum nextObject]) {
+ while ((pname = [dirEnum nextObject])) {
if ([[pname pathExtension] isEqualToString:@"psxplugin"] ||
[[pname pathExtension] isEqualToString:@"so"]) {
[dirEnum skipDescendents]; /* don't enumerate this
@@ -181,7 +181,7 @@ const static int typeList[4] = {PSE_LT_GPU, PSE_LT_SPU, PSE_LT_CDR, PSE_LT_PAD};
PcsxrPlugin *plugin = [self activePluginForType:typeList[i]];
if (nil == plugin) {
NSArray *list = [self pluginsForType:typeList[i]];
- int j;
+ NSUInteger j;
for (j=0; j<[list count]; j++) {
if ([self setActivePlugin:[list objectAtIndex:j] forType:typeList[i]])
@@ -196,7 +196,7 @@ const static int typeList[4] = {PSE_LT_GPU, PSE_LT_SPU, PSE_LT_CDR, PSE_LT_PAD};
- (NSArray *)pluginsForType:(int)typeMask
{
NSMutableArray *types = [NSMutableArray array];
- int i;
+ NSUInteger i;
for (i=0; i<[pluginList count]; i++) {
PcsxrPlugin *plugin = [pluginList objectAtIndex:i];
@@ -214,7 +214,7 @@ const static int typeList[4] = {PSE_LT_GPU, PSE_LT_SPU, PSE_LT_CDR, PSE_LT_PAD};
if (nil == path)
return NO;
- int i;
+ NSUInteger i;
for (i=0; i<[pluginList count]; i++) {
if ([[[pluginList objectAtIndex:i] path] isEqualToString:path])
return YES;