Commit f1d9b131 authored by jSTE0's avatar jSTE0
Browse files

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.
parent e16cb16e
......@@ -579,7 +579,7 @@ void S9xStartScreenRefresh()
GFX.DepthDelta = GFX.SubZBuffer - GFX.ZBuffer;
GFX.Delta = (GFX.SubScreen - GFX.Screen) >> 1;
}
if (++IPPU.FrameCount % Memory.ROMFramesPerSecond == 0)
if (++IPPU.FrameCount == (uint32)Memory.ROMFramesPerSecond)
{
IPPU.DisplayedRenderedFrameCount = IPPU.RenderedFramesCount;
IPPU.RenderedFramesCount = 0;
......
......@@ -597,7 +597,7 @@ void S9xStartScreenRefresh()
GFX.Delta = (GFX.SubScreen - GFX.Screen) >> 1;
}
if (++IPPU.FrameCount % Memory.ROMFramesPerSecond == 0)
if (++IPPU.FrameCount == (uint32)Memory.ROMFramesPerSecond)
{
IPPU.DisplayedRenderedFrameCount = IPPU.RenderedFramesCount;
IPPU.RenderedFramesCount = 0;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment