kopia lustrzana https://github.com/hoglet67/RGBtoHDMI
Fix clipping of capture size with non standard number of lines
rodzic
e3dfd69f41
commit
2ce3367a3b
|
@ -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 (;;) {
|
||||
|
|
|
@ -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;
|
||||
|
|
Ładowanie…
Reference in New Issue