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:
authorJoshua Ashton <joshua@froggi.es>2024-01-19 19:28:11 +0300
committerJoshua Ashton <joshua@froggi.es>2024-01-19 19:28:22 +0300
commit1568c263fbec4c8d5f8f9286e0be40af7fdfb9a6 (patch)
tree99489c4117a4aa0c669f4e52a85649334495e48b
parent0cd4165658537405d84a43f3ab6180b770f30fe1 (diff)
[d3d9] Only add unique modes to mode list
-rw-r--r--src/d3d9/d3d9_adapter.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/d3d9/d3d9_adapter.cpp b/src/d3d9/d3d9_adapter.cpp
index 44b631a4..e0f1a185 100644
--- a/src/d3d9/d3d9_adapter.cpp
+++ b/src/d3d9/d3d9_adapter.cpp
@@ -788,7 +788,8 @@ namespace dxvk {
// Fix up the D3DFORMAT to match what we are enumerating
mode.Format = static_cast<D3DFORMAT>(Format);
- m_modes.push_back(mode);
+ if (std::count(m_modes.begin(), m_modes.end(), mode) == 0)
+ m_modes.push_back(mode);
}
// Sort display modes by width, height and refresh rate,