VideoConfig: Limit the StereoMonoEFBDepth option to the game ini and introduce a separate section for it.

This commit is contained in:
Jules Blok 2014-11-24 12:01:21 +01:00
parent 0f4d59f612
commit f64aadd362
4 changed files with 10 additions and 9 deletions

View File

@ -32,5 +32,5 @@ $99 of some treasures
040AE530 3F000063
$End Boss Has No HP
[Video_Enhancements]
[Video_Stereoscopy]
StereoMonoEFBDepth = True

View File

@ -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);

View File

@ -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);

View File

@ -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;