From 297459c9f6113be3e1258b03fd08d7465b51b75c Mon Sep 17 00:00:00 2001 From: lightningterror Date: Thu, 14 May 2020 19:40:25 +0200 Subject: [PATCH] gsdx-d3d11: Remove exclusive fullscreen code used in legacy gsopen. --- plugins/GSdx/GSdx.cpp | 1 - plugins/GSdx/Renderers/Common/GSRenderer.h | 1 - plugins/GSdx/Renderers/DX11/GSDevice11.cpp | 30 ---------------------- plugins/GSdx/Renderers/DX11/GSDevice11.h | 2 -- 4 files changed, 34 deletions(-) diff --git a/plugins/GSdx/GSdx.cpp b/plugins/GSdx/GSdx.cpp index 4c760b15f3..86c2722ae7 100644 --- a/plugins/GSdx/GSdx.cpp +++ b/plugins/GSdx/GSdx.cpp @@ -320,7 +320,6 @@ void GSdxApp::Init() m_default_configuration["CaptureFileName"] = ""; m_default_configuration["CaptureVideoCodecDisplayName"] = ""; m_default_configuration["dx_break_on_severity"] = "0"; - m_default_configuration["windowed"] = "1"; // D3D Blending option m_default_configuration["accurate_blending_unit_d3d11"] = "1"; #else diff --git a/plugins/GSdx/Renderers/Common/GSRenderer.h b/plugins/GSdx/Renderers/Common/GSRenderer.h index a56074118c..f40cdd8d52 100644 --- a/plugins/GSdx/Renderers/Common/GSRenderer.h +++ b/plugins/GSdx/Renderers/Common/GSRenderer.h @@ -70,7 +70,6 @@ public: GSVector2i GetInternalResolution(); void SetAspectRatio(int aspect) {m_aspectratio = aspect;} void SetVSync(int vsync); - virtual void SetExclusive(bool isExcl) {} virtual bool BeginCapture(); virtual void EndCapture(); diff --git a/plugins/GSdx/Renderers/DX11/GSDevice11.cpp b/plugins/GSdx/Renderers/DX11/GSDevice11.cpp index 267bdab32a..91a76704c9 100644 --- a/plugins/GSdx/Renderers/DX11/GSDevice11.cpp +++ b/plugins/GSdx/Renderers/DX11/GSDevice11.cpp @@ -463,14 +463,6 @@ bool GSDevice11::Create(const std::shared_ptr &wnd) m_dev->CreateBlendState(&blend, &m_date.bs); - // Exclusive/Fullscreen flip, issued for legacy (managed) windows only. GSopen2 style - // emulators will issue the flip themselves later on. - - if(m_wnd->IsManaged()) - { - SetExclusive(!theApp.GetConfigB("windowed")); - } - GSVector2i tex_font = m_osd.get_texture_font_size(); m_font = std::unique_ptr( @@ -507,28 +499,6 @@ bool GSDevice11::Reset(int w, int h) return true; } -void GSDevice11::SetExclusive(bool isExcl) -{ - if(!m_swapchain) return; - - // TODO : Support for alternative display modes, by finishing this code below: - // Video mode info should be pulled form config/ini. - - /*DXGI_MODE_DESC desc; - memset(&desc, 0, sizeof(desc)); - desc.RefreshRate = 0; // must be zero for best results. - - m_swapchain->ResizeTarget(&desc); - */ - - HRESULT hr = m_swapchain->SetFullscreenState(isExcl, NULL); - - if(hr == DXGI_ERROR_NOT_CURRENTLY_AVAILABLE) - { - fprintf(stderr, "(GSdx10) SetExclusive(%s) failed; request unavailable.", isExcl ? "true" : "false"); - } -} - void GSDevice11::SetVSync(int vsync) { m_vsync = vsync ? 1 : 0; diff --git a/plugins/GSdx/Renderers/DX11/GSDevice11.h b/plugins/GSdx/Renderers/DX11/GSDevice11.h index 2f76082ffc..1f2682224b 100644 --- a/plugins/GSdx/Renderers/DX11/GSDevice11.h +++ b/plugins/GSdx/Renderers/DX11/GSDevice11.h @@ -495,8 +495,6 @@ public: void Flip(); void SetVSync(int vsync) final; - void SetExclusive(bool isExcl); - void DrawPrimitive() final; void DrawIndexedPrimitive(); void DrawIndexedPrimitive(int offset, int count) final;