summaryrefslogtreecommitdiff
path: root/plugins/dfinput
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/dfinput')
-rwxr-xr-xplugins/dfinput/cfg-gtk.c18
-rwxr-xr-xplugins/dfinput/pad.c4
2 files changed, 16 insertions, 6 deletions
diff --git a/plugins/dfinput/cfg-gtk.c b/plugins/dfinput/cfg-gtk.c
index 941d7848..6b82a753 100755
--- a/plugins/dfinput/cfg-gtk.c
+++ b/plugins/dfinput/cfg-gtk.c
@@ -775,11 +775,21 @@ int main(int argc, char *argv[]) {
gtk_init(&argc, &argv);
- if (argc > 1 && !strcmp(argv[1], "-about")) {
- PADabout();
- } else {
- PADconfigure();
+ if (argc < 2) {
+ printf ("Usage: cfgDFInput {about | configure}\n");
+ return 0;
}
+ if (strcmp(argv[1], "configure") != 0 &&
+ strcmp(argv[1], "about") != 0) {
+ printf ("Usage: cfgDFInput {about | configure}\n");
+ return 0;
+ }
+
+ if(!strcmp(argv[1], "configure"))
+ PADconfigure();
+ else if(!strcmp(argv[1], "about"))
+ PADabout();
+
return 0;
}
diff --git a/plugins/dfinput/pad.c b/plugins/dfinput/pad.c
index e4dc52b0..1a11dd41 100755
--- a/plugins/dfinput/pad.c
+++ b/plugins/dfinput/pad.c
@@ -655,7 +655,7 @@ long PADconfigure(void) {
if (pid == 0) {
if (fork() == 0) {
- execl("cfg/cfgDFInput", "cfgDFInput", NULL);
+ execl("cfg/cfgDFInput", "cfgDFInput", "configure", NULL);
}
exit(0);
} else if (pid > 0) {
@@ -670,7 +670,7 @@ void PADabout(void) {
if (pid == 0) {
if (fork() == 0) {
- execl("cfg/cfgDFInput", "cfgDFInput", "-about", NULL);
+ execl("cfg/cfgDFInput", "cfgDFInput", "about", NULL);
}
exit(0);
} else if (pid > 0) {