Decompile fn_01913 (DeviceOwnerDX9::CheckState)

Batch #14343 by Yommy: 0 byte-identical, 1 confirmed by peer review.

- fn_01913 DeviceOwnerDX9::CheckState: logic confirmed by peer review

Peer-reviewed-by: secret, KWDev, codeplay
Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes).
This commit is contained in:
ragnarok-clanker 2026-11-07 07:28:23 +00:00
commit 9ba8de11f2
2 changed files with 5 additions and 5 deletions

View file

@ -22,8 +22,8 @@ public:
void RestoreDisplayMode();
HRESULT Present(int unused);
HRESULT ClipFullscreenCursor();
HRESULT CheckState(class CRenderSystemBase* renderSystem);
bool Begin(CRenderSystemBase* renderSystem);
HRESULT CheckState();
bool Begin(class CRenderSystemBase* renderSystem);
void End();
bool CaptureBackBuffer();
bool RestoreBackBuffer();

View file

@ -13,7 +13,7 @@ namespace {
// OFFSET: 0x0054BB60
// FUNCTION: fn_01913
__declspec(noinline) HRESULT DeviceOwnerDX9::CheckState(CRenderSystemBase* renderSystem) {
__declspec(noinline) HRESULT DeviceOwnerDX9::CheckState() {
if (!this->device) {
return invalidDevice;
}
@ -40,7 +40,7 @@ __declspec(noinline) HRESULT DeviceOwnerDX9::CheckState(CRenderSystemBase* rende
result = this->device->ResetEx(&this->presentation, this->presentation.Windowed == 1 ? nullptr : &this->displayMode);
} else if (FAILED(result) && lastReported != result) {
const std::string message = std::format("{} : {}", Direct3DErrorName(result), Direct3DErrorDescription(result));
ShowErrorDialog(renderSystem, message.c_str(), 0);
ShowErrorDialog(message.c_str(), 0);
lastReported = result;
this->lastPresent = result;
@ -58,7 +58,7 @@ __declspec(noinline) HRESULT DeviceOwnerDX9::CheckState(CRenderSystemBase* rende
// OFFSET: 0x0054BAD0
// FUNCTION: fn_01911
bool DeviceOwnerDX9::Begin(CRenderSystemBase* renderSystem) {
if (!this->device || this->CheckState(renderSystem) != D3D_OK || FAILED(this->device->BeginScene())) {
if (!this->device || this->CheckState() != D3D_OK || FAILED(this->device->BeginScene())) {
return false;
}