From 0b2c29f8b46669fffd9d0733fbd007b0806975cb Mon Sep 17 00:00:00 2001 From: ragnarok-clanker Date: Thu, 12 Nov 2026 16:50:45 +0000 Subject: [PATCH] Decompile fn_01914 (DeviceOwnerDX9::CreateDevice) Batch #18616 by eAthena: 0 byte-identical, 1 confirmed by peer review. - fn_01914 DeviceOwnerDX9::CreateDevice: logic confirmed by peer review Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes). --- Source/Render/DX9/DeviceOwnerDX9.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/Source/Render/DX9/DeviceOwnerDX9.cpp b/Source/Render/DX9/DeviceOwnerDX9.cpp index 9515bfa05..f3ce95fac 100644 --- a/Source/Render/DX9/DeviceOwnerDX9.cpp +++ b/Source/Render/DX9/DeviceOwnerDX9.cpp @@ -118,9 +118,10 @@ HRESULT DeviceOwnerDX9::CreateDevice(UINT selectedAdapter) { std::memset(&this->presentation, 0, sizeof(this->presentation)); this->presentation.BackBufferWidth = width; this->presentation.BackBufferHeight = height; - this->presentation.BackBufferFormat = D3DFMT_X8R8G8B8; this->presentation.BackBufferCount = 1; + this->presentation.BackBufferFormat = D3DFMT_X8R8G8B8; this->presentation.MultiSampleType = D3DMULTISAMPLE_NONE; + this->presentation.MultiSampleQuality = 0; this->presentation.SwapEffect = D3DSWAPEFFECT_DISCARD; this->presentation.hDeviceWindow = this->window; this->presentation.Windowed = g_configuredFullscreen == 0; @@ -129,14 +130,14 @@ HRESULT DeviceOwnerDX9::CreateDevice(UINT selectedAdapter) { this->presentation.Flags = D3DPRESENTFLAG_LOCKABLE_BACKBUFFER | D3DPRESENTFLAG_DISCARD_DEPTHSTENCIL; if (!this->presentation.Windowed) { + const DWORD adapter = selectedAdapter; const D3DFORMAT format = D3DFMT_X8R8G8B8; - DisplayModeSelectorDX9 selectMode{format, this, selectedAdapter, width, height}; + DisplayModeSelectorDX9 selectMode{format, this, adapter, width, height}; if (!selectMode.Select(D3DSCANLINEORDERING_PROGRESSIVE) && !selectMode.Select(D3DSCANLINEORDERING_INTERLACED)) { - D3DDISPLAYMODEEX mode{}; - mode.Size = sizeof(mode); + D3DDISPLAYMODEEX mode = {sizeof(D3DDISPLAYMODEEX)}; D3DDISPLAYROTATION rotation = D3DDISPLAYROTATION_IDENTITY; - if (FAILED(this->direct3D->GetAdapterDisplayModeEx(selectedAdapter, &mode, &rotation))) { + if (FAILED(this->direct3D->GetAdapterDisplayModeEx(adapter, &mode, &rotation))) { return deviceError; }