From 647fd3e6cd9680f8f6dae5d3396a4250ea8a5e27 Mon Sep 17 00:00:00 2001 From: ragnarok-clanker Date: Tue, 10 Nov 2026 11:12:21 +0000 Subject: [PATCH] Decompile fn_01913 (DeviceOwnerDX9::CheckState) Batch #15821 by Yommy: 0 byte-identical, 1 confirmed by peer review. - fn_01913 DeviceOwnerDX9::CheckState: logic confirmed by peer review Peer-reviewed-by: eAthena, Tanke Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes). --- Source/Render/DX9/DeviceRecoveryDX9.cpp | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/Source/Render/DX9/DeviceRecoveryDX9.cpp b/Source/Render/DX9/DeviceRecoveryDX9.cpp index f92ab939f..d69f46584 100644 --- a/Source/Render/DX9/DeviceRecoveryDX9.cpp +++ b/Source/Render/DX9/DeviceRecoveryDX9.cpp @@ -38,13 +38,12 @@ __declspec(noinline) HRESULT DeviceOwnerDX9::CheckState() { } 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(message.c_str(), 0); - lastReported = result; - this->lastPresent = result; - - return result; + } else if (FAILED(result)) { + if (lastReported != result) { + const std::string message = std::format("{} : {}", Direct3DErrorName(result), Direct3DErrorDescription(result)); + ShowErrorDialog(message.c_str(), 0); + lastReported = result; + } } if (result == D3D_OK) {