From c81891ec4392f193b136630cb2688da8eca38cc7 Mon Sep 17 00:00:00 2001 From: Thomas Harte Date: Thu, 11 Feb 2016 22:13:38 -0500 Subject: [PATCH] Minor tidying and at least acknowledged the new flywheel encapsulation. --- Outputs/CRT/CRT.cpp | 6 +++--- Outputs/CRT/CRT.hpp | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Outputs/CRT/CRT.cpp b/Outputs/CRT/CRT.cpp index c854f787c..d58e4a246 100644 --- a/Outputs/CRT/CRT.cpp +++ b/Outputs/CRT/CRT.cpp @@ -222,8 +222,8 @@ void CRT::advance_cycles(unsigned int number_of_cycles, unsigned int source_divi while(number_of_cycles) { unsigned int time_until_vertical_sync_event, time_until_horizontal_sync_event; - SyncEvent next_vertical_sync_event = this->get_next_vertical_sync_event(vsync_requested, number_of_cycles, &time_until_vertical_sync_event); - SyncEvent next_horizontal_sync_event = this->get_next_horizontal_sync_event(hsync_requested, time_until_vertical_sync_event, &time_until_horizontal_sync_event); + SyncEvent next_vertical_sync_event = get_next_vertical_sync_event(vsync_requested, number_of_cycles, &time_until_vertical_sync_event); + SyncEvent next_horizontal_sync_event = get_next_horizontal_sync_event(hsync_requested, time_until_vertical_sync_event, &time_until_horizontal_sync_event); // get the next sync event and its timing; hsync request is instantaneous (being edge triggered) so // set it to false for the next run through this loop (if any) @@ -316,7 +316,7 @@ void CRT::advance_cycles(unsigned int number_of_cycles, unsigned int source_divi // in horizontal sync case SyncEvent::EndHSync: if (!_did_detect_hsync) { - _expected_next_hsync = (_expected_next_hsync + (_hsync_error_window >> 1) + _cycles_per_line) >> 1; + _expected_next_hsync = (_expected_next_hsync + (_hsync_error_window >> 4) + _cycles_per_line) >> 1; } _did_detect_hsync = false; _is_in_hsync = false; diff --git a/Outputs/CRT/CRT.hpp b/Outputs/CRT/CRT.hpp index f07dbb186..8742f2840 100644 --- a/Outputs/CRT/CRT.hpp +++ b/Outputs/CRT/CRT.hpp @@ -16,6 +16,7 @@ #include #include "CRTFrame.h" +#include "Flywheel.hpp" namespace Outputs {