Use ints when comparing maxfps and effectivefps so that small decimal differences in fps don't matter.

pull/3530/head
Isaac Connor 2022-07-11 14:33:07 -04:00
parent af6ad6acfa
commit 356678f164
1 changed files with 1 additions and 1 deletions

View File

@ -99,7 +99,7 @@ void StreamBase::updateFrameRate(double fps) {
if (maxfps > 0.0) {
// Min frame repeat?
// We want to keep the frame skip easy... problem is ... if effective = 31 and max = 30 then we end up with 15.5 fps.
while (effective_fps > maxfps) {
while ( (int)effective_fps > (int)maxfps ) {
effective_fps /= 2.0;
frame_mod *= 2;
Debug(3, "Changing fps to be < max %.2f EffectiveFPS:%.2f, FrameMod:%d",