Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/doitsujin/dxvk.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilip Rebohle <philip.rebohle@tu-dortmund.de>2022-09-15 16:35:54 +0300
committerPhilip Rebohle <philip.rebohle@tu-dortmund.de>2022-09-15 16:35:54 +0300
commit1c33d8be1fa28035ccc6e0993a7621b4eef03b25 (patch)
tree84407c9f9e877ea345f07cc9720a980e2339cbec
parent10d6e15646b45052c4ba0c238f17d592a25dfd48 (diff)
[dxgi] Fix return value of ChangeDisplayModedxgi-return-type-stuff
-rw-r--r--src/dxgi/dxgi_swapchain.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/dxgi/dxgi_swapchain.cpp b/src/dxgi/dxgi_swapchain.cpp
index df282350..678f3f69 100644
--- a/src/dxgi/dxgi_swapchain.cpp
+++ b/src/dxgi/dxgi_swapchain.cpp
@@ -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;
}