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:
parent
f1ac3dc6d3
commit
305cafc8c8
2
gfx.cpp
2
gfx.cpp
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user