Fix clipping of capture size with non standard number of lines

pull/360/head
IanSB 2023-11-06 00:58:07 +00:00
rodzic e3dfd69f41
commit 2ce3367a3b
2 zmienionych plików z 5 dodań i 2 usunięć

Wyświetl plik

@ -614,6 +614,7 @@ void scan_profiles(char *prefix, char manufacturer_names[MAX_PROFILES][MAX_PROFI
char fpath[MAX_STRING_SIZE];
static FILINFO fno;
init_filesystem();
log_info("Reading path: %s", path);
res = f_opendir(&dir, path);
if (res == FR_OK) {
for (;;) {

Wyświetl plik

@ -2698,10 +2698,12 @@ int get_sync_detected() {
int get_lines_per_vsync(int compensate) {
if (compensate) {
int lines = geometry_get_value(LINES_FRAME);
if (lines_per_vsync > (lines - 20) && lines_per_vsync <= (lines + 1)) {
int clock_ppm = geometry_get_value(CLOCK_PPM);
int frame_window = 20 + clock_ppm * lines / 1000000;
if (lines_per_vsync >= (lines - frame_window) && lines_per_vsync <= (lines + 1)) {
return lines_per_vsync;
} else {
return lines;
return lines;
}
} else {
return lines_per_vsync;