mirror of
https://github.com/TomHarte/CLK.git
synced 2024-12-26 09:29:45 +00:00
Avoids observer communication if motor status hasn't changed.
This commit is contained in:
parent
74a2f717b3
commit
78c7137427
@ -117,6 +117,7 @@ bool Drive::get_is_ready() {
|
||||
}
|
||||
|
||||
void Drive::set_motor_on(bool motor_is_on) {
|
||||
if(motor_is_on_ != motor_is_on) {
|
||||
motor_is_on_ = motor_is_on;
|
||||
|
||||
if(observer_) {
|
||||
@ -131,6 +132,7 @@ void Drive::set_motor_on(bool motor_is_on) {
|
||||
if(disk_) disk_->flush_tracks();
|
||||
}
|
||||
update_clocking_observer();
|
||||
}
|
||||
}
|
||||
|
||||
bool Drive::get_motor_on() {
|
||||
|
Loading…
Reference in New Issue
Block a user