summaryrefslogtreecommitdiff
path: root/plugins/dfnet
diff options
context:
space:
mode:
authorSND\edgbla_cp <SND\edgbla_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97>2013-02-23 02:54:51 +0000
committerSND\edgbla_cp <SND\edgbla_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97>2013-02-23 02:54:51 +0000
commit56fc32e977409e38b09bf4820244b3699f1e3b4c (patch)
tree43511dafd5af0c5ecee323784379efbfc906d08d /plugins/dfnet
parentd3b43b5b645e6f2f80de3fa25b43a18ba8ca2eb2 (diff)
downloadpcsxr-56fc32e977409e38b09bf4820244b3699f1e3b4c.tar.gz
.
git-svn-id: https://pcsxr.svn.codeplex.com/svn/pcsxr@83100 e17a0e51-4ae3-4d35-97c3-1a29b211df97
Diffstat (limited to 'plugins/dfnet')
-rwxr-xr-xplugins/dfnet/gui.c37
1 files changed, 25 insertions, 12 deletions
diff --git a/plugins/dfnet/gui.c b/plugins/dfnet/gui.c
index 7dbb5642..27644e99 100755
--- a/plugins/dfnet/gui.c
+++ b/plugins/dfnet/gui.c
@@ -214,18 +214,31 @@ int main(int argc, char *argv[]) {
gtk_init(&argc, &argv);
- if (!strcmp(argv[1], "configure")) {
- CFGconfigure();
- } else if (!strcmp(argv[1], "open")) {
- return CFGopen();
- } else if (!strcmp(argv[1], "wait")) {
- CFGwait();
- } else if (!strcmp(argv[1], "pause")) {
- return CFGpause();
- } else if (!strcmp(argv[1], "about")) {
- CFGabout();
- } else if (!strcmp(argv[1], "message")) {
- CFGmessage(&argv[2], argc - 2);
+ if (argc < 2) {
+ printf ("Usage: cfgDFNet {about | configure | open | wait | pause | message}\n");
+ return 0;
+ }
+
+ if (strcmp(argv[1], "configure") != 0 &&
+ strcmp(argv[1], "about") != 0) {
+ printf ("Usage: cfgDFNet {about | configure | open | wait | pause | message}\n");
+ return 0;
+ }
+
+ if(argc > 1) {
+ if (!strcmp(argv[1], "configure")) {
+ CFGconfigure();
+ } else if (!strcmp(argv[1], "about")) {
+ CFGabout();
+ } else if (!strcmp(argv[1], "open")) {
+ return CFGopen();
+ } else if (!strcmp(argv[1], "wait")) {
+ CFGwait();
+ } else if (!strcmp(argv[1], "pause")) {
+ return CFGpause();
+ } else if (!strcmp(argv[1], "message")) {
+ CFGmessage(&argv[2], argc - 2);
+ }
}
return 0;