mirror of
https://github.com/TomHarte/CLK.git
synced 2026-04-21 02:17:08 +00:00
Adjust vertical sync test.
This commit is contained in:
+1
-1
@@ -400,7 +400,7 @@ void CRT::posit(Display::Rect rect) {
|
||||
rect.size.width < 0.95 * scan_target_modals_.output_scale.x &&
|
||||
rect.size.height < 0.95 * scan_target_modals_.output_scale.y
|
||||
) {
|
||||
rect.scale(1.02f, 1.02f);
|
||||
rect.scale(1.01f, 1.01f);
|
||||
}
|
||||
|
||||
// Scale and push a rect.
|
||||
|
||||
@@ -111,7 +111,7 @@ struct Flywheel {
|
||||
}
|
||||
|
||||
bool was_stable() const {
|
||||
return std::abs(last_adjustment_) < 10; // TODO: don't hard code this nonsense.
|
||||
return std::abs(last_adjustment_) < (sync_error_window_ / 250);
|
||||
}
|
||||
|
||||
/*!
|
||||
|
||||
@@ -27,8 +27,12 @@ struct RectAccumulator {
|
||||
}
|
||||
|
||||
std::optional<Display::Rect> first_reading() const {
|
||||
if(candidates_.pushes() != 2) return std::nullopt;
|
||||
return candidates_.join(2);
|
||||
// Wait for two fields and return the union of those; that'll ensure that
|
||||
// interlaced video is boxed correctly.
|
||||
if(candidates_.pushes() == 2) {
|
||||
return candidates_.join(2);
|
||||
}
|
||||
return std::nullopt;
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
Reference in New Issue
Block a user