video: Change refresh min/max to a floating point value (#625)
This commit is contained in:
@@ -1836,16 +1836,16 @@ void video_mode_adjust()
|
||||
Fpix = 0;
|
||||
}
|
||||
|
||||
uint32_t hz = 100000000 / vtime;
|
||||
float hz = 100000000.0f / vtime;
|
||||
if (cfg.refresh_min && hz < cfg.refresh_min)
|
||||
{
|
||||
printf("Estimated frame rate (%d Hz) is less than MONITOR_HZ_MIN(%d Hz). Canceling auto-adjust.\n", hz, cfg.refresh_min);
|
||||
printf("Estimated frame rate (%f Hz) is less than REFRESH_MIN(%f Hz). Canceling auto-adjust.\n", hz, cfg.refresh_min);
|
||||
Fpix = 0;
|
||||
}
|
||||
|
||||
if (cfg.refresh_max && hz > cfg.refresh_max)
|
||||
{
|
||||
printf("Estimated frame rate (%d Hz) is more than MONITOR_HZ_MAX(%d Hz). Canceling auto-adjust.\n", hz, cfg.refresh_max);
|
||||
printf("Estimated frame rate (%f Hz) is more than REFRESH_MAX(%f Hz). Canceling auto-adjust.\n", hz, cfg.refresh_max);
|
||||
Fpix = 0;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user