From b25d8c162ff2de6edeeb5fb228406d340368cd3f Mon Sep 17 00:00:00 2001 From: ragnarok-clanker Date: Tue, 10 Nov 2026 07:13:40 +0000 Subject: [PATCH] Decompile 2 functions in Source/Render/DX7/DeviceOwnerDX7.cpp Batch #15583 by Yommy: 2 byte-identical, 0 confirmed by peer review. - fn_01897 DeviceOwnerDX7::Close: byte-identical - fn_01899 ?SelectDepthFormat@?A0x0c6bb5f1@@YGJPAU_DDPIXELFORMAT@@PAX@Z: byte-identical Merged automatically: every function is byte-identical to the original. --- Source/Render/DX7/DeviceOwnerDX7.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/Source/Render/DX7/DeviceOwnerDX7.cpp b/Source/Render/DX7/DeviceOwnerDX7.cpp index abbfc6647..b15f270d5 100644 --- a/Source/Render/DX7/DeviceOwnerDX7.cpp +++ b/Source/Render/DX7/DeviceOwnerDX7.cpp @@ -57,7 +57,11 @@ namespace { } *selected = *candidate; - return candidate->dwZBufferBitDepth < 32 ? D3DENUMRET_OK : D3DENUMRET_CANCEL; + if (candidate->dwZBufferBitDepth >= 32) { + return D3DENUMRET_CANCEL; + } + + return D3DENUMRET_OK; } // INLINED @@ -309,6 +313,7 @@ HRESULT DeviceOwnerDX7::CreateDevice(GUID* drawIdentity, const GUID* renderIdent // OFFSET: 0x0054A7D0 // FUNCTION: fn_01897 HRESULT DeviceOwnerDX7::Close() { + ULONG drawReferences = 0; ULONG deviceReferences = 0; if (this->device) { @@ -353,8 +358,6 @@ HRESULT DeviceOwnerDX7::Close() { this->captureSurface = nullptr; } - ULONG drawReferences = 0; - if (this->draw) { this->draw->SetCooperativeLevel(this->window, DDSCL_NORMAL); drawReferences = this->draw->Release();