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).
This commit is contained in:
parent
4919dc6dbb
commit
0b2c29f8b4
1 changed files with 6 additions and 5 deletions
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue