mirror of
https://github.com/TomHarte/CLK.git
synced 2026-04-20 10:17:05 +00:00
Quick fixes: the binary tape player now considers talk to the sleep observer only if motor control changes. The Amstrad CPC no longer attempts to use the component argument to identify the caller, since this will often be that of the superclass and not that of the derived class known to the CPC.
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user