1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2024-12-05 01:24:14 +01:00

[dxgi] Fix return value of ChangeDisplayMode

This commit is contained in:
Philip Rebohle 2022-09-15 15:35:54 +02:00
parent 10d6e15646
commit 1c33d8be1f

View File

@ -663,7 +663,10 @@ namespace dxvk {
selectedMode1.Scaling = selectedMode.Scaling;
selectedMode1.Stereo = false;
return wsi::setWindowMode(outputDesc.Monitor, m_window, ConvertDisplayMode(selectedMode1));
if (!wsi::setWindowMode(outputDesc.Monitor, m_window, ConvertDisplayMode(selectedMode1)))
return DXGI_ERROR_NOT_CURRENTLY_AVAILABLE;
return S_OK;
}
@ -671,9 +674,10 @@ namespace dxvk {
if (!hMonitor)
return DXGI_ERROR_INVALID_CALL;
return wsi::restoreDisplayMode()
? S_OK
: DXGI_ERROR_NOT_CURRENTLY_AVAILABLE;
if (!wsi::restoreDisplayMode())
return DXGI_ERROR_NOT_CURRENTLY_AVAILABLE;
return S_OK;
}