Commit 61b6f8f2 authored by Joshua Ashton's avatar Joshua Ashton 🐸

[d3d9] Hook up GetAdapterDisplayMode to resp. adapter func

Fixes fullscreen at < native res in Vampire: The Masquerade Bloodlines 1/2
parent 91574993
......@@ -75,10 +75,22 @@ namespace dxvk {
HRESULT STDMETHODCALLTYPE D3D9InterfaceEx::GetAdapterDisplayMode(UINT Adapter, D3DDISPLAYMODE* pMode) {
constexpr D3DFORMAT format = D3DFMT_X8R8G8B8;
const UINT mode = GetAdapterModeCount(Adapter, format) - 1;
if (auto* adapter = GetAdapter(Adapter)) {
D3DDISPLAYMODEEX modeEx;
HRESULT hr = adapter->GetAdapterDisplayModeEx(&modeEx, nullptr);
return this->EnumAdapterModes(Adapter, format, mode, pMode);
if (FAILED(hr))
return hr;
pMode->Width = modeEx.Width;
pMode->Height = modeEx.Height;
pMode->RefreshRate = modeEx.RefreshRate;
pMode->Format = modeEx.Format;
return D3D_OK;
}
return D3DERR_INVALIDCALL;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment