1
0
mirror of https://github.com/TomHarte/CLK.git synced 2026-04-22 08:16:42 +00:00

Enhances reported data.

This commit is contained in:
Thomas Harte
2020-01-22 22:01:17 -05:00
parent 9d97a294a7
commit a5f285b4ce
3 changed files with 42 additions and 13 deletions
+2
View File
@@ -472,9 +472,11 @@ Outputs::Display::ScanStatus CRT::get_scaled_scan_status() const {
Outputs::Display::ScanStatus status;
status.field_duration = float(vertical_flywheel_->get_locked_period()) / float(time_multiplier_);
status.field_duration_gradient = float(vertical_flywheel_->get_last_period_adjustment()) / float(time_multiplier_);
status.retrace_duration = float(vertical_flywheel_->get_retrace_period()) / float(time_multiplier_);
status.current_position =
std::max(0.0f,
float(vertical_flywheel_->get_current_output_position()) / (float(vertical_flywheel_->get_locked_period()) * float(time_multiplier_))
);
status.hsync_count = vertical_flywheel_->get_number_of_retraces();
return status;
}