Administrative source import: native x86 compilation passed for 423 authored units. Source placement and submission states are migrated separately; this commit does not imply peer acceptance.
Previous head: 35d2a8cb36
Payload SHA256: 592f016d2730c5593bb653aa054c1e5f76a6df72c8f5a09e66f74876e2e33dee
30 lines
883 B
C++
30 lines
883 B
C++
#include "Render/DX9/DeviceOwnerDX9.h"
|
|
#include "Render/DX9/RendererPresentation.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";
|
|
this->diagnostic.line = 161;
|
|
this->diagnostic.file = source;
|
|
const HRESULT result = owner.Present(option);
|
|
this->diagnostic.line = 164;
|
|
this->diagnostic.file = source;
|
|
|
|
return result;
|
|
}
|