gfx: Use simpler equality test for IPPU.FrameCount

As it's only incremented here and then reset to 0, avoids integer
division, which can be be expensive on CPUs without this instruction
such as pre-ARMv7 classic ARMs.
This commit is contained in:
jSTE0 2022-02-04 22:48:48 +00:00
parent f1ac3dc6d3
commit 305cafc8c8

View file

@ -191,7 +191,7 @@ void S9xStartScreenRefresh (void)
memset(GFX.SubZBuffer, 0, GFX.ScreenSize);
}
if (++IPPU.FrameCount % Memory.ROMFramesPerSecond == 0)
if (++IPPU.FrameCount == (uint32)Memory.ROMFramesPerSecond)
{
IPPU.DisplayedRenderedFrameCount = IPPU.RenderedFramesCount;
IPPU.RenderedFramesCount = 0;