From 6da099d7e1aafd1f1446316e05a97fc2b4db95ac Mon Sep 17 00:00:00 2001 From: Thomas Harte Date: Mon, 22 Mar 2021 22:42:10 -0400 Subject: [PATCH] Ensures the enter key is cleared before fast-loading tapes have loaded. --- Machines/Sinclair/ZXSpectrum/ZXSpectrum.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Machines/Sinclair/ZXSpectrum/ZXSpectrum.cpp b/Machines/Sinclair/ZXSpectrum/ZXSpectrum.cpp index 20dddc04b..4bb9ec581 100644 --- a/Machines/Sinclair/ZXSpectrum/ZXSpectrum.cpp +++ b/Machines/Sinclair/ZXSpectrum/ZXSpectrum.cpp @@ -198,6 +198,12 @@ template class ConcreteMachine: // The below patches over the 'LD-BYTES' routine from the 48kb ROM. if(use_fast_tape_hack_ && address == 0x0556 && read_pointers_[0] == &rom_[0xc000]) { if(perform_rom_ld_bytes()) { + // Stop pressing enter, if neccessry. + if(duration_to_press_enter_ > Cycles(0)) { + duration_to_press_enter_ = Cycles(0); + keyboard_.set_key_state(ZX::Keyboard::KeyEnter, false); + } + *cycle.value = 0xc9; // i.e. RET. break; }