summaryrefslogtreecommitdiff
path: root/macosx/PluginList.m
diff options
context:
space:
mode:
Diffstat (limited to 'macosx/PluginList.m')
-rwxr-xr-xmacosx/PluginList.m33
1 files changed, 30 insertions, 3 deletions
diff --git a/macosx/PluginList.m b/macosx/PluginList.m
index 12c1054b..6fa341d9 100755
--- a/macosx/PluginList.m
+++ b/macosx/PluginList.m
@@ -101,7 +101,7 @@ const static int typeList[5] = {PSE_LT_GPU, PSE_LT_SPU, PSE_LT_CDR, PSE_LT_PAD,
activeGpuPlugin = activeSpuPlugin = activeCdrPlugin = activePadPlugin = activeNetPlugin = nil;
missingPlugins = NO;
- for (i = 0; i < sizeof(*typeList); i++) {
+ for (i = 0; i < sizeof(typeList) / sizeof(typeList[0]); i++) {
NSString *path = [defaults stringForKey:[PcsxrPlugin defaultKeyForType:typeList[i]]];
if (nil == path) {
missingPlugins = YES;
@@ -121,7 +121,7 @@ const static int typeList[5] = {PSE_LT_GPU, PSE_LT_SPU, PSE_LT_CDR, PSE_LT_PAD,
}
}
}
-
+
if (missingPlugins) {
[self refreshPlugins];
}
@@ -314,7 +314,7 @@ const static int typeList[5] = {PSE_LT_GPU, PSE_LT_SPU, PSE_LT_CDR, PSE_LT_PAD,
const char *str;
if (plugin != nil) {
str = [[plugin path] fileSystemRepresentation];
- if (str == nil) {
+ if (str == NULL) {
str = "Invalid Plugin";
}
} else {
@@ -339,4 +339,31 @@ const static int typeList[5] = {PSE_LT_GPU, PSE_LT_SPU, PSE_LT_CDR, PSE_LT_PAD,
return plugin != nil;
}
+- (void)disableNetPlug
+{
+ char **dst = [PcsxrPlugin configEntriesForType:PSE_LT_NET];
+ while (*dst) {
+ strcpy(*dst, "Disabled");
+ dst++;
+ }
+}
+
+- (void)enableNetPlug
+{
+ PcsxrPlugin *netPlug = [self activePluginForType:PSE_LT_NET];
+
+ const char *str = NULL;
+ if (netPlug) {
+ str = [[netPlug path] fileSystemRepresentation];
+ }
+ if (str) {
+ char **dst = [PcsxrPlugin configEntriesForType:PSE_LT_NET];
+ while (*dst) {
+ strlcpy(*dst, str, MAXPATHLEN);
+ dst++;
+ }
+ }
+
+}
+
@end