[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
1 changed files with 8 additions and 4 deletions

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;
}