From 9cdc0da63bed2fe0aa1cfd6813aabfc4419fdf01 Mon Sep 17 00:00:00 2001 From: Stephen White Date: Sun, 22 Jul 2018 18:47:03 +1000 Subject: [PATCH] Button 5 can be used to change device ID. --- src/iec_bus.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/iec_bus.h b/src/iec_bus.h index 0ca9705..53aa5af 100644 --- a/src/iec_bus.h +++ b/src/iec_bus.h @@ -582,9 +582,10 @@ public: } static bool GetInputButtonPressed(int buttonIndex) { return InputButton[buttonIndex] && !InputButtonPrev[buttonIndex]; } - static bool GetInputButtonReleased(int buttonIndex) { return !InputButton[buttonIndex] && InputButtonPrev[buttonIndex]; } + static bool GetInputButtonReleased(int buttonIndex) { return InputButton[buttonIndex] == false; } static bool GetInputButton(int buttonIndex) { return InputButton[buttonIndex]; } static bool GetInputButtonRepeating(int buttonIndex) { return inputRepeat[buttonIndex] != inputRepeatPrev[buttonIndex]; } + static bool GetInputButtonHeld(int buttonIndex) { return inputRepeatThreshold[buttonIndex] >= INPUT_BUTTON_DEBOUNCE_THRESHOLD + (INPUT_BUTTON_REPEAT_THRESHOLD * 2); } static bool OutputLED; static bool OutputSound;