diff --git a/Components/9918/9918.cpp b/Components/9918/9918.cpp index 11512c7ae..07ff15c8f 100644 --- a/Components/9918/9918.cpp +++ b/Components/9918/9918.cpp @@ -190,7 +190,9 @@ void TMS9918::run_for(const HalfCycles cycles) { int read_cycles_pool = int_cycles; while(write_cycles_pool || read_cycles_pool) { +#ifndef NDEBUG LineBufferPointer backup = read_pointer_; +#endif if(write_cycles_pool) { // Determine how much writing to do. @@ -329,8 +331,10 @@ void TMS9918::run_for(const HalfCycles cycles) { } +#ifndef NDEBUG assert(backup.row == read_pointer_.row && backup.column == read_pointer_.column); backup = write_pointer_; +#endif if(read_cycles_pool) { diff --git a/Outputs/ScanTarget.hpp b/Outputs/ScanTarget.hpp index 92899e0c3..0860af010 100644 --- a/Outputs/ScanTarget.hpp +++ b/Outputs/ScanTarget.hpp @@ -381,22 +381,22 @@ struct ScanTarget { struct ScanStatus { /// The current (prediced) length of a field (including retrace). - Time::Seconds field_duration; + Time::Seconds field_duration = 0.0; /// The difference applied to the field_duration estimate during the last field. - Time::Seconds field_duration_gradient; + Time::Seconds field_duration_gradient = 0.0; /// The amount of time this device spends in retrace. - Time::Seconds retrace_duration; + Time::Seconds retrace_duration = 0.0; /// The distance into the current field, from a small negative amount (in retrace) through /// 0 (start of visible area field) to 1 (end of field). /// /// This will increase monotonically, being a measure /// of the current vertical position — i.e. if current_position = 0.8 then a caller can /// conclude that the top 80% of the visible part of the display has been painted. - float current_position; + float current_position = 0.0f; /// The total number of hsyncs so far encountered; - int hsync_count; + int hsync_count = 0; /// @c true if retrace is currently going on; @c false otherwise. - bool is_in_retrace; + bool is_in_retrace = false; /*! @returns this ScanStatus, with time-relative fields scaled by dividing them by @c dividend.