From 32107408722696a23a45e238c289c3a760c985a7 Mon Sep 17 00:00:00 2001 From: ramapcsx2 Date: Mon, 21 Dec 2015 19:30:03 +0100 Subject: [PATCH] Patch by r5 that reorders renderers in GSdx' config dialog. Also removes some redundant options. --- plugins/GSdx/GSSettingsDlg.cpp | 8 +++++--- plugins/GSdx/GSdx.cpp | 35 +++++++++++++++++++++++----------- 2 files changed, 29 insertions(+), 14 deletions(-) diff --git a/plugins/GSdx/GSSettingsDlg.cpp b/plugins/GSdx/GSSettingsDlg.cpp index e9f92ee7df..81a15d0856 100644 --- a/plugins/GSdx/GSSettingsDlg.cpp +++ b/plugins/GSdx/GSSettingsDlg.cpp @@ -145,7 +145,6 @@ void GSSettingsDlg::OnInit() ComboBoxInit(IDC_ADAPTER, adapter_settings, adapter_sel); ComboBoxInit(IDC_OPENCL_DEVICE, m_ocl_devs, ocl_sel); - UpdateRenderers(); ComboBoxInit(IDC_INTERLACE, theApp.m_gs_interlace, theApp.GetConfig("Interlace", 7)); // 7 = "auto", detects interlace based on SMODE2 register @@ -317,14 +316,17 @@ void GSSettingsDlg::UpdateRenderers() GSSetting r = theApp.m_gs_renderers[i]; GSRendererType renderer = static_cast(r.id); - + +#if 0 + // This code is disabled so the renderer name doesn't get messed with. + // Just call it Direct3D11. if(renderer == GSRendererType::DX1011_HW || renderer == GSRendererType::DX1011_SW || renderer == GSRendererType::DX1011_Null || renderer == GSRendererType::DX1011_OpenCL) { if(level < D3D_FEATURE_LEVEL_10_0) continue; r.name += (level >= D3D_FEATURE_LEVEL_11_0 ? "11" : "10"); } - +#endif renderers.push_back(r); if (static_cast(r.id) == renderer_setting) diff --git a/plugins/GSdx/GSdx.cpp b/plugins/GSdx/GSdx.cpp index 13b251644f..ada647aedb 100644 --- a/plugins/GSdx/GSdx.cpp +++ b/plugins/GSdx/GSdx.cpp @@ -129,25 +129,38 @@ GSdxApp::GSdxApp() m_section = "Settings"; #ifdef _WINDOWS - m_gs_renderers.push_back(GSSetting(static_cast(GSRendererType::DX9_HW), "Direct3D9", "Hardware")); - m_gs_renderers.push_back(GSSetting(static_cast(GSRendererType::DX9_SW), "Direct3D9", "Software")); - m_gs_renderers.push_back(GSSetting(static_cast(GSRendererType::DX9_Null), "Direct3D9", "Null")); - m_gs_renderers.push_back(GSSetting(static_cast(GSRendererType::DX1011_HW), "Direct3D", "Hardware")); - m_gs_renderers.push_back(GSSetting(static_cast(GSRendererType::DX1011_SW), "Direct3D", "Software")); - m_gs_renderers.push_back(GSSetting(static_cast(GSRendererType::DX1011_Null), "Direct3D", "Null")); - m_gs_renderers.push_back(GSSetting(static_cast(GSRendererType::Null_SW), "Null", "Software")); - m_gs_renderers.push_back(GSSetting(static_cast(GSRendererType::Null_Null), "Null", "Null")); + // GPU accelerated options come first + m_gs_renderers.push_back(GSSetting(static_cast(GSRendererType::DX9_HW), "Direct3D9", "")); + m_gs_renderers.push_back(GSSetting(static_cast(GSRendererType::DX1011_HW), "Direct3D11", "")); #endif - m_gs_renderers.push_back(GSSetting(static_cast(GSRendererType::OGL_HW), "OpenGL", "Hardware")); - m_gs_renderers.push_back(GSSetting(static_cast(GSRendererType::OGL_SW), "OpenGL", "Software")); + m_gs_renderers.push_back(GSSetting(static_cast(GSRendererType::OGL_HW), "OpenGL", "")); + + // Software renderer variants come second +#ifdef _WINDOWS + m_gs_renderers.push_back(GSSetting(static_cast(GSRendererType::DX9_SW), "Software Renderer", "Direct3D9")); + m_gs_renderers.push_back(GSSetting(static_cast(GSRendererType::DX1011_SW), "Software Renderer", "Direct3D11")); +#endif + m_gs_renderers.push_back(GSSetting(static_cast(GSRendererType::OGL_SW), "Software Renderer", "OpenGL")); + + // The null renderer goes third, it has use for benchmarking purposes in a release build + m_gs_renderers.push_back(GSSetting(static_cast(GSRendererType::Null_Null), "Null", "")); #ifdef ENABLE_OPENCL + // OpenCL stuff goes last // FIXME openCL isn't attached to a device (could be impacted by the window management stuff however) m_gs_renderers.push_back(GSSetting(static_cast(GSRendererType::DX9_OpenCL), "Direct3D9", "OpenCL")); - m_gs_renderers.push_back(GSSetting(static_cast(GSRendererType::DX1011_OpenCL), "Direct3D", "OpenCL")); + m_gs_renderers.push_back(GSSetting(static_cast(GSRendererType::DX1011_OpenCL), "Direct3D11", "OpenCL")); m_gs_renderers.push_back(GSSetting(static_cast(GSRendererType::Null_OpenCL), "Null", "OpenCL")); m_gs_renderers.push_back(GSSetting(static_cast(GSRendererType::OGL_OpenCL), "OpenGL", "OpenCL")); #endif +#ifdef _DEBUG + // Every other option gets relegated to debug builds + m_gs_renderers.push_back(GSSetting(static_cast(GSRendererType::DX9_Null), "Direct3D9", "Null")); + m_gs_renderers.push_back(GSSetting(static_cast(GSRendererType::DX1011_Null), "Direct3D11", "Null")); + m_gs_renderers.push_back(GSSetting(static_cast(GSRendererType::Null_SW), "Null", "Software")); + m_gs_renderers.push_back(GSSetting(static_cast(GSRendererType::Null_Null), "Null", "Null")); +#endif + m_gs_interlace.push_back(GSSetting(0, "None", "")); m_gs_interlace.push_back(GSSetting(1, "Weave tff", "saw-tooth")); m_gs_interlace.push_back(GSSetting(2, "Weave bff", "saw-tooth"));