From faaa4961ed9a1bbe7b0d3e2b373eeb6c805083f2 Mon Sep 17 00:00:00 2001 From: Thomas Harte Date: Fri, 26 Mar 2021 23:54:08 -0400 Subject: [PATCH] Attempts to rely on JustInTimeActor's built-in ClockingHint::Observer. --- Machines/Sinclair/ZXSpectrum/ZXSpectrum.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/Machines/Sinclair/ZXSpectrum/ZXSpectrum.cpp b/Machines/Sinclair/ZXSpectrum/ZXSpectrum.cpp index e16fa633d..c076d5090 100644 --- a/Machines/Sinclair/ZXSpectrum/ZXSpectrum.cpp +++ b/Machines/Sinclair/ZXSpectrum/ZXSpectrum.cpp @@ -85,7 +85,6 @@ template class ConcreteMachine: memcpy(rom_.data(), roms[0]->data(), std::min(rom_.size(), roms[0]->size())); // Register for sleeping notifications. - fdc_->set_clocking_hint_observer(this); tape_player_.set_clocking_hint_observer(this); // Set up initial memory map. @@ -384,7 +383,7 @@ template class ConcreteMachine: } if constexpr (model == Model::Plus3) { - if(!fdc_is_sleeping_) fdc_ += Cycles(duration.as_integral()); + fdc_ += Cycles(duration.as_integral()); } if(typer_) typer_->run_for(duration); @@ -448,7 +447,6 @@ template class ConcreteMachine: // MARK: - ClockingHint::Observer. void set_component_prefers_clocking(ClockingHint::Source *, ClockingHint::Preference) override { - fdc_is_sleeping_ = fdc_.last_valid()->preferred_clocking() == ClockingHint::Preference::None; tape_player_is_sleeping_ = tape_player_.preferred_clocking() == ClockingHint::Preference::None; } @@ -666,7 +664,6 @@ template class ConcreteMachine: // MARK: - Disc. JustInTimeActor fdc_; - bool fdc_is_sleeping_ = false; // MARK: - Automatic startup. Cycles duration_to_press_enter_;