1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-12-25 03:32:01 +00:00

Resolves out-of-bounds initial condition whenever this loop began with start_line = 2047.

This, I believe, was the remaining cause of screen flashes.
This commit is contained in:
Thomas Harte 2019-02-24 19:50:19 -05:00
parent a6e61ef83b
commit 7bb90c78d9

View File

@ -576,7 +576,7 @@ void ScanTarget::draw(bool synchronous, int output_width, int output_height) {
// Divide spans by which frame they're in.
uint16_t start_line = read_pointers.line;
while(new_lines) {
uint16_t end_line = start_line+1;
uint16_t end_line = (start_line + 1) % LineBufferHeight;
// Find the limit of spans to draw in this cycle.
size_t lines = 1;