GPU: Make updating the 3D renderer FPS into its own method.

This commit is contained in:
rogerman 2016-12-23 09:56:55 -08:00
parent 922a7ac6f6
commit fa971e3d63
2 changed files with 13 additions and 7 deletions
desmume/src

View File

@ -6900,6 +6900,17 @@ void GPUSubsystem::FinalizeAndDeallocate()
free_aligned(this);
}
void GPUSubsystem::_UpdateFPSRender3D()
{
this->_videoFrameCount++;
if (this->_videoFrameCount == 60)
{
this->_render3DFrameCount = gfx3d.render3DFrameCount;
gfx3d.render3DFrameCount = 0;
this->_videoFrameCount = 0;
}
}
void GPUSubsystem::SetEventHandler(GPUEventHandler *eventHandler)
{
this->_event = eventHandler;
@ -7471,13 +7482,7 @@ void GPUSubsystem::RenderLine(const size_t l, bool isFrameSkipRequested)
this->_engineMain->FramebufferPostprocess();
this->_engineSub->FramebufferPostprocess();
this->_videoFrameCount++;
if (this->_videoFrameCount == 60)
{
this->_render3DFrameCount = gfx3d.render3DFrameCount;
gfx3d.render3DFrameCount = 0;
this->_videoFrameCount = 0;
}
this->_UpdateFPSRender3D();
if (!isFrameSkipRequested)
{

View File

@ -1648,6 +1648,7 @@ private:
NDSDisplayInfo _displayInfo;
void _UpdateFPSRender3D();
void _AllocateFramebuffers(NDSColorFormat outputFormat, size_t w, size_t h, void *clientNativeBuffer, void *clientCustomBuffer);
public: