mirror of
https://github.com/TomHarte/CLK.git
synced 2025-04-10 22:37:30 +00:00
Minor step towards correct answers: divide by time_multiplier_.
This commit is contained in:
parent
82e5def7c4
commit
e7fff6e123
@ -420,7 +420,7 @@ void CRT::output_data(int number_of_cycles, size_t number_of_samples) {
|
||||
|
||||
// MARK: - Getters.
|
||||
|
||||
Outputs::Display::Rect CRT::get_rect_for_area(int first_line_after_sync, int number_of_lines, int first_cycle_after_sync, int number_of_cycles, float aspect_ratio) {
|
||||
Outputs::Display::Rect CRT::get_rect_for_area(int first_line_after_sync, int number_of_lines, int first_cycle_after_sync, int number_of_cycles, float aspect_ratio) const {
|
||||
first_cycle_after_sync *= time_multiplier_;
|
||||
number_of_cycles *= time_multiplier_;
|
||||
|
||||
@ -470,8 +470,11 @@ Outputs::Display::Rect CRT::get_rect_for_area(int first_line_after_sync, int num
|
||||
|
||||
Outputs::Display::ScanStatus CRT::get_scan_status() const {
|
||||
Outputs::Display::ScanStatus status;
|
||||
status.field_duration = vertical_flywheel_->get_locked_period();
|
||||
status.field_duration_gradient = vertical_flywheel_->get_last_period_adjustment();
|
||||
status.current_position = float(vertical_flywheel_->get_current_output_position()) / float(vertical_flywheel_->get_locked_period());
|
||||
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.current_position =
|
||||
std::max(0.0f,
|
||||
float(vertical_flywheel_->get_current_output_position()) / (float(vertical_flywheel_->get_locked_period()) * float(time_multiplier_))
|
||||
);
|
||||
return status;
|
||||
}
|
||||
|
@ -264,7 +264,7 @@ class CRT {
|
||||
int number_of_lines,
|
||||
int first_cycle_after_sync,
|
||||
int number_of_cycles,
|
||||
float aspect_ratio);
|
||||
float aspect_ratio) const;
|
||||
|
||||
/*! Sets the CRT delegate; set to @c nullptr if no delegate is desired. */
|
||||
inline void set_delegate(Delegate *delegate) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user