mirror of
https://github.com/TomHarte/CLK.git
synced 2024-07-05 10:28:58 +00:00
Simplified slightly.
This commit is contained in:
parent
ed8c73eb14
commit
0bf4fdc9af
@ -308,7 +308,6 @@ void CRT::output_scan(const Scan *const scan) {
|
|||||||
cycles_of_sync_ += scan->number_of_cycles;
|
cycles_of_sync_ += scan->number_of_cycles;
|
||||||
|
|
||||||
if(this_is_sync && cycles_of_sync_ >= sync_capacitor_charge_threshold_) {
|
if(this_is_sync && cycles_of_sync_ >= sync_capacitor_charge_threshold_) {
|
||||||
is_refusing_sync_ = true;
|
|
||||||
unsigned int overshoot = std::min(cycles_of_sync_ - sync_capacitor_charge_threshold_, number_of_cycles);
|
unsigned int overshoot = std::min(cycles_of_sync_ - sync_capacitor_charge_threshold_, number_of_cycles);
|
||||||
if(overshoot) {
|
if(overshoot) {
|
||||||
number_of_cycles -= overshoot;
|
number_of_cycles -= overshoot;
|
||||||
@ -317,8 +316,7 @@ void CRT::output_scan(const Scan *const scan) {
|
|||||||
number_of_cycles = overshoot;
|
number_of_cycles = overshoot;
|
||||||
}
|
}
|
||||||
|
|
||||||
cycles_of_sync_ = 0;
|
is_refusing_sync_ = true;
|
||||||
is_accumulating_sync_ = false;
|
|
||||||
vsync_requested = true;
|
vsync_requested = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user