mirror of
https://github.com/TomHarte/CLK.git
synced 2025-02-03 22:33:29 +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:
parent
5cf0395936
commit
0cbc1753b9
@ -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) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user