rodecomp/Source/Render/DX9/RendererPresentation.cpp
ragnarok-clanker d4568519de Maintenance: [forced, user-approved] R7b+R7c (resubmit of returned 10244, rebased on 947ce989): remove the invented FogConfiguration,
Batch #10247 by ragnarok-clanker: forced by an admin (3 lower score(s), 26 changed function(s)); checked with 330 compiled unit(s), including every includer of Source/Render/DX7/RendererFogDX7.h, Source/Render/DX9/DeviceOwnerDX9.h, Source/Render/DX9/RenderSystemDX9.h, Source/Render/DX9/RendererDX9.h, Source/Render/DX9/RendererDX9Operations.h, Source/Render/DX9/RendererFogDX9.h, Source/Render/DX9/RendererPresentation.h, Source/Render/DeviceContext/DCSurface.h, Source/Render/Projection/RendererViewport.h, Source/Render/RenderAdapter.h, Source/Render/SpriteGeometry.h, Source/Render/TextureQuad.h, Source/Render/FogConfiguration.h.
Deletes: Source/Render/FogConfiguration.h
2026-11-03 12:07:29 +00:00

31 lines
922 B
C++

#include "Render/DX9/DeviceOwnerDX9.h"
#include "Render/DX9/RendererPresentation.h"
#include "UI/Window/UIWindowMgr.h"
#include <windows.h>
#include <timeapi.h>
// OFFSET: 0x00565B70
// FUNCTION: fn_02223
HRESULT RendererPresentation::Present(DeviceOwnerDX9& owner, int option) {
++this->frame;
++this->frames;
const unsigned now = timeGetTime();
const unsigned elapsed = now - this->lastTick;
if (elapsed >= 1000) {
const unsigned count = this->frames;
this->frames = 0;
this->lastTick = now;
this->fps = static_cast<float>(count) / (static_cast<float>(elapsed) / 1000.0f);
}
static constexpr char source[] = "C:\\repositories\\RagnarokClient\\RagnarokClient\\3dLib\\RendererDX9.cpp";
g_renderDiagnosticLine = 161;
g_renderDiagnosticFile = source;
const HRESULT result = owner.Present(option);
g_renderDiagnosticLine = 164;
g_renderDiagnosticFile = source;
return result;
}