From f64aadd3621941c9910d21a595175e59ae1d30e9 Mon Sep 17 00:00:00 2001 From: Jules Blok Date: Mon, 24 Nov 2014 12:01:21 +0100 Subject: [PATCH] VideoConfig: Limit the StereoMonoEFBDepth option to the game ini and introduce a separate section for it. --- Data/Sys/GameSettings/GLME01.ini | 2 +- Source/Core/DolphinWX/VideoConfigDiag.cpp | 5 +---- Source/Core/VideoCommon/VideoConfig.cpp | 8 +++++--- Source/Core/VideoCommon/VideoConfig.h | 4 +++- 4 files changed, 10 insertions(+), 9 deletions(-) diff --git a/Data/Sys/GameSettings/GLME01.ini b/Data/Sys/GameSettings/GLME01.ini index 832dd61df0..ccabdf2a10 100644 --- a/Data/Sys/GameSettings/GLME01.ini +++ b/Data/Sys/GameSettings/GLME01.ini @@ -32,5 +32,5 @@ $99 of some treasures 040AE530 3F000063 $End Boss Has No HP -[Video_Enhancements] +[Video_Stereoscopy] StereoMonoEFBDepth = True diff --git a/Source/Core/DolphinWX/VideoConfigDiag.cpp b/Source/Core/DolphinWX/VideoConfigDiag.cpp index b930ec2dbe..a2b1d4812a 100644 --- a/Source/Core/DolphinWX/VideoConfigDiag.cpp +++ b/Source/Core/DolphinWX/VideoConfigDiag.cpp @@ -153,7 +153,6 @@ static wxString stereo_3d_desc = wxTRANSLATE("Select the stereoscopic 3D mode, static wxString stereo_separation_desc = wxTRANSLATE("Control the interpupillary distance, this is the distance between the virtual eyes."); static wxString stereo_convergence_desc = wxTRANSLATE("Control the convergence distance, this controls the apparant distance of virtual objects.\nA higher value creates a stronger feeling of depth while a lower value is generally more comfortable."); static wxString stereo_swap_desc = wxTRANSLATE("Swap the left and right eye, mostly useful if you want to view side-by-side cross-eyed.\n\nIf unsure, leave this unchecked."); -static wxString stereo_mono_depth_desc = wxTRANSLATE("Use the same depth buffer for both eyes in an EFB copy.\nThis is needed for games which use the depth buffer to calculate shadows.\n\nIf unsure, leave this unchecked."); #if !defined(__APPLE__) @@ -472,9 +471,7 @@ VideoConfigDiag::VideoConfigDiag(wxWindow* parent, const std::string &title, con szr_stereo->Add(new wxStaticText(page_enh, wxID_ANY, _("Convergence:")), 1, wxALIGN_CENTER_VERTICAL, 0); szr_stereo->Add(conv_slider, 0, wxEXPAND | wxRIGHT); - szr_stereo->Add(CreateCheckBox(page_enh, _("Swap eyes"), wxGetTranslation(stereo_swap_desc), vconfig.bStereoSwapEyes)); - - szr_stereo->Add(CreateCheckBox(page_enh, _("Mono EFB Depth Copy"), wxGetTranslation(stereo_mono_depth_desc), vconfig.bStereoMonoEFBDepth)); + szr_stereo->Add(CreateCheckBox(page_enh, _("Swap Eyes"), wxGetTranslation(stereo_swap_desc), vconfig.bStereoSwapEyes)); wxStaticBoxSizer* const group_stereo = new wxStaticBoxSizer(wxVERTICAL, page_enh, _("Stereoscopy")); group_stereo->Add(szr_stereo, 1, wxEXPAND | wxLEFT | wxRIGHT | wxBOTTOM, 5); diff --git a/Source/Core/VideoCommon/VideoConfig.cpp b/Source/Core/VideoCommon/VideoConfig.cpp index 2caeaee778..76baa6d1d0 100644 --- a/Source/Core/VideoCommon/VideoConfig.cpp +++ b/Source/Core/VideoCommon/VideoConfig.cpp @@ -38,6 +38,9 @@ VideoConfig::VideoConfig() backend_info.APIType = API_NONE; backend_info.bUseMinimalMipCount = false; backend_info.bSupportsExclusiveFullscreen = false; + + // Game-specific stereoscopy settings + bStereoMonoEFBDepth = false; } void VideoConfig::Load(const std::string& ini_file) @@ -86,7 +89,6 @@ void VideoConfig::Load(const std::string& ini_file) enhancements->Get("StereoSeparation", &iStereoSeparation, 50); enhancements->Get("StereoConvergence", &iStereoConvergence, 30); enhancements->Get("StereoSwapEyes", &bStereoSwapEyes, false); - enhancements->Get("StereoMonoEFBDepth", &bStereoMonoEFBDepth, false); IniFile::Section* hacks = iniFile.GetOrCreateSection("Hacks"); hacks->Get("EFBAccessEnable", &bEFBAccessEnable, true); @@ -182,7 +184,8 @@ void VideoConfig::GameIniLoad() CHECK_SETTING("Video_Enhancements", "StereoSeparation", iStereoSeparation); CHECK_SETTING("Video_Enhancements", "StereoConvergence", iStereoConvergence); CHECK_SETTING("Video_Enhancements", "StereoSwapEyes", bStereoSwapEyes); - CHECK_SETTING("Video_Enhancements", "StereoMonoEFBDepth", bStereoMonoEFBDepth); + + CHECK_SETTING("Video_Stereoscopy", "StereoMonoEFBDepth", bStereoMonoEFBDepth); CHECK_SETTING("Video_Hacks", "EFBAccessEnable", bEFBAccessEnable); CHECK_SETTING("Video_Hacks", "EFBCopyEnable", bEFBCopyEnable); @@ -256,7 +259,6 @@ void VideoConfig::Save(const std::string& ini_file) enhancements->Set("StereoSeparation", iStereoSeparation); enhancements->Set("StereoConvergence", iStereoConvergence); enhancements->Set("StereoSwapEyes", bStereoSwapEyes); - enhancements->Set("StereoMonoEFBDepth", bStereoMonoEFBDepth); IniFile::Section* hacks = iniFile.GetOrCreateSection("Hacks"); hacks->Set("EFBAccessEnable", bEFBAccessEnable); diff --git a/Source/Core/VideoCommon/VideoConfig.h b/Source/Core/VideoCommon/VideoConfig.h index c64ea8377d..67bb9e4439 100644 --- a/Source/Core/VideoCommon/VideoConfig.h +++ b/Source/Core/VideoCommon/VideoConfig.h @@ -83,7 +83,6 @@ struct VideoConfig final int iStereoSeparation; int iStereoConvergence; bool bStereoSwapEyes; - bool bStereoMonoEFBDepth; // Information bool bShowFPS; @@ -125,6 +124,9 @@ struct VideoConfig final int iLog; // CONF_ bits int iSaveTargetId; // TODO: Should be dropped + // Stereoscopy + bool bStereoMonoEFBDepth; + // D3D only config, mostly to be merged into the above int iAdapter;