GPU: Make updating the 3D renderer FPS into its own method.
This commit is contained in:
parent
922a7ac6f6
commit
fa971e3d63
|
@ -6900,6 +6900,17 @@ void GPUSubsystem::FinalizeAndDeallocate()
|
||||||
free_aligned(this);
|
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)
|
void GPUSubsystem::SetEventHandler(GPUEventHandler *eventHandler)
|
||||||
{
|
{
|
||||||
this->_event = eventHandler;
|
this->_event = eventHandler;
|
||||||
|
@ -7471,13 +7482,7 @@ void GPUSubsystem::RenderLine(const size_t l, bool isFrameSkipRequested)
|
||||||
this->_engineMain->FramebufferPostprocess();
|
this->_engineMain->FramebufferPostprocess();
|
||||||
this->_engineSub->FramebufferPostprocess();
|
this->_engineSub->FramebufferPostprocess();
|
||||||
|
|
||||||
this->_videoFrameCount++;
|
this->_UpdateFPSRender3D();
|
||||||
if (this->_videoFrameCount == 60)
|
|
||||||
{
|
|
||||||
this->_render3DFrameCount = gfx3d.render3DFrameCount;
|
|
||||||
gfx3d.render3DFrameCount = 0;
|
|
||||||
this->_videoFrameCount = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!isFrameSkipRequested)
|
if (!isFrameSkipRequested)
|
||||||
{
|
{
|
||||||
|
|
|
@ -1648,6 +1648,7 @@ private:
|
||||||
|
|
||||||
NDSDisplayInfo _displayInfo;
|
NDSDisplayInfo _displayInfo;
|
||||||
|
|
||||||
|
void _UpdateFPSRender3D();
|
||||||
void _AllocateFramebuffers(NDSColorFormat outputFormat, size_t w, size_t h, void *clientNativeBuffer, void *clientCustomBuffer);
|
void _AllocateFramebuffers(NDSColorFormat outputFormat, size_t w, size_t h, void *clientNativeBuffer, void *clientCustomBuffer);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
Loading…
Reference in New Issue