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 + (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