mirror of
https://github.com/TomHarte/CLK.git
synced 2024-11-21 21:33:54 +00:00
Count time in phase correctly.
This commit is contained in:
parent
0f8bc416d1
commit
bbc0d8b050
@ -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_;
|
||||
|
Loading…
Reference in New Issue
Block a user