X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?p=pcsx_rearmed.git;a=blobdiff_plain;f=macosx%2FPluginList.m;fp=macosx%2FPluginList.m;h=0000000000000000000000000000000000000000;hp=62c877c1227a0be334a4d41d6226882ea18f755c;hb=aa1fc44b4532dc68be2482730a275f8a3ba8a039;hpb=ef79bbde537d6b9c745a7d86cb9df1d04c35590d diff --git a/macosx/PluginList.m b/macosx/PluginList.m deleted file mode 100644 index 62c877c1..00000000 --- a/macosx/PluginList.m +++ /dev/null @@ -1,324 +0,0 @@ -// -// PluginList.m -// Pcsx -// -// Created by Gil Pedersen on Sun Sep 21 2003. -// Copyright (c) 2003 __MyCompanyName__. All rights reserved. -// - -#import "EmuThread.h" -#import "PluginList.h" -#import "PcsxPlugin.h" -#include "psxcommon.h" -#include "plugins.h" - -//NSMutableArray *plugins; -static PluginList *sPluginList = nil; -const static int typeList[4] = {PSE_LT_GPU, PSE_LT_SPU, PSE_LT_CDR, PSE_LT_PAD}; - -@implementation PluginList - -+ (PluginList *)list -{ - return sPluginList; -} - -#if 0 -+ (void)loadPlugins -{ - NSDirectoryEnumerator *dirEnum; - NSString *pname, *dir; - - // Make sure we only load the plugins once - if (plugins != nil) - return; - - plugins = [[NSMutableArray alloc] initWithCapacity: 20]; - - dir = [NSString stringWithCString: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 */ - - PcsxPlugin *plugin = [[PcsxPlugin alloc] initWithPath:pname]; - if (plugin != nil) { - [plugins addObject:plugin]; - } - } - } -} - -- (id)initWithType:(int)typeMask -{ - unsigned int i; - - self = [super init]; - - [PluginList loadPlugins]; - list = [[NSMutableArray alloc] initWithCapacity: 5]; - - type = typeMask; - for (i=0; i<[plugins count]; i++) { - PcsxPlugin *plugin = [plugins objectAtIndex:i]; - if ([plugin getType] == type) { - [list addObject:plugin]; - } - } - - return self; -} - -- (int)numberOfItems -{ - return [list count]; -} - -- (id)objectAtIndex:(unsigned)index -{ - return [list objectAtIndex:index]; -} -#endif - - - -- (id)init -{ - int i; - - if (!(self = [super init])) - return nil; - - NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; - pluginList = [[NSMutableArray alloc] initWithCapacity:20]; - - activeGpuPlugin = activeSpuPlugin = activeCdrPlugin = activePadPlugin = nil; - - missingPlugins = NO; - for (i=0; i