summaryrefslogtreecommitdiff
path: root/setup/txt_joybinput.c
diff options
context:
space:
mode:
Diffstat (limited to 'setup/txt_joybinput.c')
-rw-r--r--setup/txt_joybinput.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/setup/txt_joybinput.c b/setup/txt_joybinput.c
index 861414f7..9ad26a45 100644
--- a/setup/txt_joybinput.c
+++ b/setup/txt_joybinput.c
@@ -48,7 +48,12 @@ static int EventCallback(SDL_Event *event, TXT_UNCAST_ARG(joystick_input))
if (event->type == SDL_JOYBUTTONDOWN)
{
*joystick_input->variable = event->jbutton.button;
- TXT_EmitSignal(joystick_input, "set");
+
+ if (joystick_input->check_conflicts)
+ {
+ TXT_EmitSignal(joystick_input, "set");
+ }
+
TXT_CloseWindow(joystick_input->prompt_window);
return 1;
}
@@ -89,6 +94,10 @@ static void OpenPromptWindow(txt_joystick_input_t *joystick_input)
txt_label_t *label;
SDL_Joystick *joystick;
+ // Silently update when the shift button is held down.
+
+ joystick_input->check_conflicts = !TXT_GetModifierState(TXT_MOD_SHIFT);
+
if (SDL_Init(SDL_INIT_JOYSTICK) < 0)
{
return;