summaryrefslogtreecommitdiff
path: root/macosx/Source
diff options
context:
space:
mode:
Diffstat (limited to 'macosx/Source')
-rw-r--r--macosx/Source/PcsxrPlugin.m2
-rw-r--r--macosx/Source/PluginList.h6
-rw-r--r--macosx/Source/PluginList.m16
3 files changed, 21 insertions, 3 deletions
diff --git a/macosx/Source/PcsxrPlugin.m b/macosx/Source/PcsxrPlugin.m
index 1472b634..3b43cbb8 100644
--- a/macosx/Source/PcsxrPlugin.m
+++ b/macosx/Source/PcsxrPlugin.m
@@ -369,7 +369,7 @@
- (NSUInteger)hash
{
- return [path hash];
+ return [fullPlugPath hash];
}
- (NSString *)description
diff --git a/macosx/Source/PluginList.h b/macosx/Source/PluginList.h
index 0ffdf38e..2383cf32 100644
--- a/macosx/Source/PluginList.h
+++ b/macosx/Source/PluginList.h
@@ -10,8 +10,9 @@
#import "PcsxrPlugin.h"
//extern NSMutableArray *plugins;
+@class PcsxrPlugin;
-@interface PluginList : NSObject
+@interface PluginList : NSObject <NSFastEnumeration>
+ (PluginList *)list;
@@ -25,4 +26,7 @@
- (void)disableNetPlug;
- (void)enableNetPlug;
+- (PcsxrPlugin*)objectAtIndexedSubscript:(NSInteger)index;
+- (NSInteger)count;
+
@end
diff --git a/macosx/Source/PluginList.m b/macosx/Source/PluginList.m
index cbe4cb95..fe5870bb 100644
--- a/macosx/Source/PluginList.m
+++ b/macosx/Source/PluginList.m
@@ -312,7 +312,21 @@ const static int typeList[] = {PSE_LT_GPU, PSE_LT_SPU, PSE_LT_CDR, PSE_LT_PAD, P
dst++;
}
}
-
+}
+
+- (NSInteger)count;
+{
+ return self.pluginList.count;
+}
+
+- (NSUInteger)countByEnumeratingWithState:(NSFastEnumerationState *)state objects:(__unsafe_unretained id [])buffer count:(NSUInteger)len
+{
+ return [self.pluginList countByEnumeratingWithState:state objects:buffer count:len];
+}
+
+- (PcsxrPlugin*)objectAtIndexedSubscript:(NSInteger)index
+{
+ return self.pluginList[index];
}
@end