diff options
| author | Jules Blok <jules.blok@gmail.com> | 2016-11-09 01:41:38 +0100 |
|---|---|---|
| committer | Jules Blok <jules.blok@gmail.com> | 2016-11-11 20:36:10 +0100 |
| commit | 9909babe2c482c2fc7d65a4594188067df0a8ece (patch) | |
| tree | 250c929cadf643fa5daee9ec4ac4d26da74fff9c /Source/Core/VideoBackends/D3D/D3DBase.cpp | |
| parent | 0028ee96b34d566f459f690a44e0c5ffcc7621a0 (diff) | |
D3DBase: Create the swapchain in fullscreen mode if enabled.
Diffstat (limited to 'Source/Core/VideoBackends/D3D/D3DBase.cpp')
| -rw-r--r-- | Source/Core/VideoBackends/D3D/D3DBase.cpp | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/Source/Core/VideoBackends/D3D/D3DBase.cpp b/Source/Core/VideoBackends/D3D/D3DBase.cpp index 21580c856d..3edd936efa 100644 --- a/Source/Core/VideoBackends/D3D/D3DBase.cpp +++ b/Source/Core/VideoBackends/D3D/D3DBase.cpp @@ -8,6 +8,7 @@ #include "Common/Logging/Log.h" #include "Common/MsgHandler.h" #include "Common/StringUtil.h" +#include "Core/ConfigManager.h" #include "VideoBackends/D3D/D3DBase.h" #include "VideoBackends/D3D/D3DState.h" #include "VideoBackends/D3D/D3DTexture.h" @@ -315,7 +316,8 @@ HRESULT Create(HWND wnd) swap_chain_desc.OutputWindow = wnd; swap_chain_desc.SampleDesc.Count = 1; swap_chain_desc.SampleDesc.Quality = 0; - swap_chain_desc.Windowed = TRUE; + swap_chain_desc.Windowed = + !SConfig::GetInstance().bFullscreen || g_ActiveConfig.bBorderlessFullscreen; DXGI_OUTPUT_DESC out_desc = {}; output->GetDesc(&out_desc); @@ -610,17 +612,11 @@ HRESULT SetFullscreenState(bool enable_fullscreen) return swapchain->SetFullscreenState(enable_fullscreen, nullptr); } -HRESULT GetFullscreenState(bool* fullscreen_state) +bool GetFullscreenState() { - if (fullscreen_state == nullptr) - { - return E_POINTER; - } - - BOOL state; - HRESULT hr = swapchain->GetFullscreenState(&state, nullptr); - *fullscreen_state = !!state; - return hr; + BOOL state = FALSE; + swapchain->GetFullscreenState(&state, nullptr); + return !!state; } } // namespace D3D |
