rodecomp/Source/Render/DX9/RendererPresentation.cpp
ragnarok-clanker e7f4eb710f Maintenance: [forced, user-approved] R10b: remove invented RendererPresentation, RendererPresentationDX7 and TextureDX7Context. Evide
Batch #10266 by ragnarok-clanker: forced by an admin (1 lower score(s), 12 changed function(s)); checked with 32 compiled unit(s), including every includer of Source/Render/DX7/DeviceOwnerDX7.h, Source/Render/DX7/TextureAllocationDX7.h, Source/Render/DX7/TextureDX7.h, Source/Render/DX9/RendererDX9.h, Source/Render/RendererDX7.h, Source/Render/DX7/RendererPresentationDX7.h, Source/Render/DX9/RendererPresentation.h.
Deletes: Source/Render/DX7/RendererPresentationDX7.h, Source/Render/DX9/RendererPresentation.h
2026-11-03 14:14:42 +00:00

31 lines
890 B
C++

#include "Render/DX9/DeviceOwnerDX9.h"
#include "Render/DX9/RendererDX9.h"
#include "UI/Window/UIWindowMgr.h"
#include <windows.h>
#include <timeapi.h>
// OFFSET: 0x00565B70
// FUNCTION: fn_02223
HRESULT CRendererDX9::Present(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 = this->device->Present(option);
g_renderDiagnosticLine = 164;
g_renderDiagnosticFile = source;
return result;
}