1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-11-22 12:33:29 +00:00

Count time in phase correctly.

This commit is contained in:
Thomas Harte 2024-03-21 21:15:25 -04:00
parent 0f8bc416d1
commit bbc0d8b050

View File

@ -192,6 +192,7 @@ struct Video {
}
phase_ = new_phase;
time_in_phase_ = 0;
}
}
@ -229,9 +230,9 @@ private:
uint32_t position = 0;
Phase phase = Phase::Sync;
void increment_position(int divider) {
void increment_position(uint32_t divider) {
++position;
if(position == 1024*divider) position = 0;
if(position == 1024 * divider) position = 0;
}
};
State horizontal_state_, vertical_state_;