From 0446e350d313b275292b686f305d7bc0235261ba Mon Sep 17 00:00:00 2001 From: Thomas Harte Date: Sat, 3 Nov 2018 23:51:26 -0400 Subject: [PATCH] Resolves sizing of texture coordinates, and improves constness slightly. --- Outputs/CRT/CRT.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Outputs/CRT/CRT.cpp b/Outputs/CRT/CRT.cpp index 9fd56ede3..b6f984fd5 100644 --- a/Outputs/CRT/CRT.cpp +++ b/Outputs/CRT/CRT.cpp @@ -133,15 +133,15 @@ void CRT::advance_cycles(int number_of_cycles, bool hsync_requested, bool vsync_ number_of_cycles *= time_multiplier_; const bool is_output_run = ((type == Scan::Type::Level) || (type == Scan::Type::Data)); - const auto total_cycles = number_of_cycles * time_multiplier_; + const auto total_cycles = number_of_cycles; bool did_output = false; while(number_of_cycles) { // Get time until next horizontal and vertical sync generator events. int time_until_vertical_sync_event, time_until_horizontal_sync_event; - Flywheel::SyncEvent next_vertical_sync_event = get_next_vertical_sync_event(vsync_requested, number_of_cycles, &time_until_vertical_sync_event); - Flywheel::SyncEvent next_horizontal_sync_event = get_next_horizontal_sync_event(hsync_requested, time_until_vertical_sync_event, &time_until_horizontal_sync_event); + const Flywheel::SyncEvent next_vertical_sync_event = get_next_vertical_sync_event(vsync_requested, number_of_cycles, &time_until_vertical_sync_event); + const Flywheel::SyncEvent next_horizontal_sync_event = get_next_horizontal_sync_event(hsync_requested, time_until_vertical_sync_event, &time_until_horizontal_sync_event); // Whichever event is scheduled to happen first is the one to advance to. const int next_run_length = std::min(time_until_vertical_sync_event, time_until_horizontal_sync_event);