mirror of
https://github.com/TomHarte/CLK.git
synced 2025-02-16 18:30:32 +00:00
Avoid VDP access races.
This commit is contained in:
parent
da944fde92
commit
9836a108da
@ -181,24 +181,27 @@ template <Analyser::Static::Sega::Target::Model model> class ConcreteMachine:
|
|||||||
}
|
}
|
||||||
|
|
||||||
void set_scan_target(Outputs::Display::ScanTarget *scan_target) final {
|
void set_scan_target(Outputs::Display::ScanTarget *scan_target) final {
|
||||||
vdp_->set_tv_standard(
|
vdp_.last_valid()->set_tv_standard(
|
||||||
(region_ == Target::Region::Europe) ?
|
(region_ == Target::Region::Europe) ?
|
||||||
TI::TMS::TVStandard::PAL : TI::TMS::TVStandard::NTSC);
|
TI::TMS::TVStandard::PAL : TI::TMS::TVStandard::NTSC);
|
||||||
time_until_debounce_ = vdp_->get_time_until_line(-1);
|
|
||||||
|
|
||||||
vdp_->set_scan_target(scan_target);
|
// Doing the following would be technically correct, but isn't
|
||||||
|
// especially thread-safe and won't make a substantial difference.
|
||||||
|
// time_until_debounce_ = vdp_->get_time_until_line(-1);
|
||||||
|
|
||||||
|
vdp_.last_valid()->set_scan_target(scan_target);
|
||||||
}
|
}
|
||||||
|
|
||||||
Outputs::Display::ScanStatus get_scaled_scan_status() const final {
|
Outputs::Display::ScanStatus get_scaled_scan_status() const final {
|
||||||
return vdp_->get_scaled_scan_status();
|
return vdp_.last_valid()->get_scaled_scan_status();
|
||||||
}
|
}
|
||||||
|
|
||||||
void set_display_type(Outputs::Display::DisplayType display_type) final {
|
void set_display_type(Outputs::Display::DisplayType display_type) final {
|
||||||
vdp_->set_display_type(display_type);
|
vdp_.last_valid()->set_display_type(display_type);
|
||||||
}
|
}
|
||||||
|
|
||||||
Outputs::Display::DisplayType get_display_type() const final {
|
Outputs::Display::DisplayType get_display_type() const final {
|
||||||
return vdp_->get_display_type();
|
return vdp_.last_valid()->get_display_type();
|
||||||
}
|
}
|
||||||
|
|
||||||
Outputs::Speaker::Speaker *get_speaker() final {
|
Outputs::Speaker::Speaker *get_speaker() final {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user