Merge pull request #148 from Remboooo/remboooo/fix-exiting-emulation-mode-with-gpio-button

Fix exiting emulation mode with ENTER (GPIO) button
This commit is contained in:
Stephen White 2019-09-22 11:16:36 +10:00 committed by GitHub
commit a382c75376
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -140,16 +140,20 @@ void InputMappings::CheckButtonsEmulationMode()
{
buttonFlags = 0;
if (IEC_Bus::GetInputButtonPressed(INPUT_BUTTON_ENTER))
SetButtonFlag(ESC_FLAG);
else if (IEC_Bus::GetInputButtonPressed(INPUT_BUTTON_UP))
if (IEC_Bus::GetInputButtonRepeating(INPUT_BUTTON_UP))
SetButtonFlag(NEXT_FLAG);
else if (IEC_Bus::GetInputButtonPressed(INPUT_BUTTON_DOWN))
else if (IEC_Bus::GetInputButtonRepeating(INPUT_BUTTON_DOWN))
SetButtonFlag(PREV_FLAG);
//else if (IEC_Bus::GetInputButtonPressed(INPUT_BUTTON_BACK))
// SetButtonFlag(BACK_FLAG);
//else if (IEC_Bus::GetInputButtonPressed(INPUT_BUTTON_INSERT))
// SetButtonFlag(INSERT_FLAG);
else {
enterButtonPressed = !IEC_Bus::GetInputButtonReleased(INPUT_BUTTON_ENTER);
if (enterButtonPressedPrev && !enterButtonPressed)
SetButtonFlag(ESC_FLAG);
enterButtonPressedPrev = enterButtonPressed;
}
}