1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-07-29 16:29:08 +00:00

Merge pull request #216 from TomHarte/NoiseReduciton

Cleans up issues affecting the sleeper mechanism and the CPC
This commit is contained in:
Thomas Harte 2017-08-20 13:26:56 -04:00 committed by GitHub
commit 1237f174fe
2 changed files with 6 additions and 4 deletions

View File

@ -917,8 +917,8 @@ class ConcreteMachine:
}
void set_component_is_sleeping(void *component, bool is_sleeping) {
if(component == &fdc_) fdc_is_sleeping_ = is_sleeping;
else tape_player_is_sleeping_ = is_sleeping;
fdc_is_sleeping_ = fdc_.is_sleeping();
tape_player_is_sleeping_ = tape_player_.is_sleeping();
}
#pragma mark - Keyboard

View File

@ -125,8 +125,10 @@ bool BinaryTapePlayer::is_sleeping() {
}
void BinaryTapePlayer::set_motor_control(bool enabled) {
motor_is_running_ = enabled;
update_sleep_observer();
if(motor_is_running_ != enabled) {
motor_is_running_ = enabled;
update_sleep_observer();
}
}
void BinaryTapePlayer::set_tape_output(bool set) {