summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Howard2007-06-01 18:06:15 +0000
committerSimon Howard2007-06-01 18:06:15 +0000
commit880ce3aa3f7fd7f8d2345982603e8bfa8914fd4f (patch)
tree6fdee4357bf490b2340559e1608e0d300688c832
parent7127f6c844ee24e3629f292a8301395111266a7e (diff)
downloadchocolate-doom-880ce3aa3f7fd7f8d2345982603e8bfa8914fd4f.tar.gz
chocolate-doom-880ce3aa3f7fd7f8d2345982603e8bfa8914fd4f.tar.bz2
chocolate-doom-880ce3aa3f7fd7f8d2345982603e8bfa8914fd4f.zip
Hide the joystick speed control when the always run hack is being used.
Subversion-branch: /trunk/chocolate-doom Subversion-revision: 888
-rw-r--r--setup/joystick.c14
-rw-r--r--setup/keyboard.c4
2 files changed, 14 insertions, 4 deletions
diff --git a/setup/joystick.c b/setup/joystick.c
index 435a864c..ce6a81ec 100644
--- a/setup/joystick.c
+++ b/setup/joystick.c
@@ -98,14 +98,24 @@ void ConfigJoystick(void)
TXT_AddWidgets(button_table,
TXT_NewLabel("Fire"),
TXT_NewJoystickInput(&joybfire),
- TXT_NewLabel("Speed"),
- TXT_NewJoystickInput(&joybspeed),
TXT_NewLabel("Use"),
TXT_NewJoystickInput(&joybuse),
TXT_NewLabel("Strafe"),
TXT_NewJoystickInput(&joybstrafe),
NULL);
+ // High values of joybspeed are used to activate the "always run mode"
+ // trick in Vanilla Doom. If this has been enabled, not only is the
+ // joybspeed value meaningless, but the control itself is useless.
+
+ if (joybspeed < 20)
+ {
+ TXT_AddWidgets(button_table,
+ TXT_NewLabel("Speed"),
+ TXT_NewJoystickInput(&joybspeed),
+ NULL);
+ }
+
SetJoystickButtonLabel();
}
diff --git a/setup/keyboard.c b/setup/keyboard.c
index bb749d4d..e558840a 100644
--- a/setup/keyboard.c
+++ b/setup/keyboard.c
@@ -61,7 +61,7 @@ static void UpdateJoybSpeed(TXT_UNCAST_ARG(widget), TXT_UNCAST_ARG(var))
}
else
{
- joybspeed = 0;
+ joybspeed = 0;
}
}
@@ -102,7 +102,7 @@ void ConfigKeyboard(void)
txt_table_t *action_table;
txt_checkbox_t *run_control;
- always_run = joybspeed >= 10;
+ always_run = joybspeed >= 20;
window = TXT_NewWindow("Keyboard configuration");