mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-02-20 19:54:19 +01:00
[d3d9] Hook up GetAdapterDisplayMode to resp. adapter func
Fixes fullscreen at < native res in Vampire: The Masquerade Bloodlines 1/2
This commit is contained in:
parent
91574993df
commit
61b6f8f297
@ -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;
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user