|
10 | 10 | namespace dxvk { |
11 | 11 |
|
12 | 12 | static Singleton<DxvkInstance> g_dxvkInstance; |
| 13 | + static Singleton<DxgiOptions> g_dxgiOptions; |
13 | 14 |
|
14 | 15 | static dxvk::mutex s_globalHDRStateMutex; |
15 | 16 | static DXVK_VK_GLOBAL_HDR_STATE s_globalHDRState{}; |
@@ -81,8 +82,8 @@ namespace dxvk { |
81 | 82 | DxgiFactory::DxgiFactory(UINT Flags) |
82 | 83 | : m_instance (g_dxvkInstance.acquire(0)), |
83 | 84 | m_interop (this), |
84 | | - m_options (m_instance->config()), |
85 | | - m_monitorInfo (this, m_options), |
| 85 | + m_options (g_dxgiOptions.acquire(m_instance->config())), |
| 86 | + m_monitorInfo (this, *m_options), |
86 | 87 | m_flags (Flags), |
87 | 88 | m_monitorFallback (false), |
88 | 89 | m_destructionNotifier(this) { |
@@ -134,6 +135,7 @@ namespace dxvk { |
134 | 135 |
|
135 | 136 |
|
136 | 137 | DxgiFactory::~DxgiFactory() { |
| 138 | + g_dxgiOptions.release(); |
137 | 139 | g_dxvkInstance.release(); |
138 | 140 | } |
139 | 141 |
|
@@ -284,7 +286,7 @@ namespace dxvk { |
284 | 286 | IDXGISwapChain1** ppSwapChain) { |
285 | 287 | InitReturnPtr(ppSwapChain); |
286 | 288 |
|
287 | | - if (!m_options.enableDummyCompositionSwapchain) { |
| 289 | + if (!m_options->enableDummyCompositionSwapchain) { |
288 | 290 | Logger::err("DxgiFactory::CreateSwapChainForComposition: Not implemented"); |
289 | 291 | return E_NOTIMPL; |
290 | 292 | } |
|
0 commit comments