VideoConfig: Change convergence setting to percentage value.

This commit is contained in:
Jules Blok 2015-09-10 22:14:21 +02:00
parent e670d29dfe
commit ee657c04fe
8 changed files with 14 additions and 15 deletions

View File

@ -25,4 +25,4 @@ EFBToTextureEnable = False
FastDepthCalc = False
[Video_Stereoscopy]
StereoConvergenceMinimum = 115
StereoConvergence = 115

View File

@ -18,4 +18,4 @@ EmulationIssues = Classic mode score report needs real xfb. Nes masterpieces and
# Add action replay cheats here.
[Video_Stereoscopy]
StereoConvergenceMinimum = 136
StereoConvergence = 136

View File

@ -22,4 +22,4 @@ FastDepthCalc = False
SafeTextureCacheColorSamples = 512
[Video_Stereoscopy]
StereoConvergenceMinimum = 26
StereoConvergence = 26

View File

@ -439,7 +439,7 @@ VideoConfigDiag::VideoConfigDiag(wxWindow* parent, const std::string &title, con
szr_stereo->Add(new wxStaticText(page_enh, wxID_ANY, _("Depth:")), 1, wxALIGN_CENTER_VERTICAL, 0);
szr_stereo->Add(sep_slider, 0, wxEXPAND | wxRIGHT);
wxSlider* const conv_slider = new wxSlider(page_enh, wxID_ANY, vconfig.iStereoConvergence, 0, 500, wxDefaultPosition, wxDefaultSize);
wxSlider* const conv_slider = new wxSlider(page_enh, wxID_ANY, vconfig.iStereoConvergencePercentage, 0, 200, wxDefaultPosition, wxDefaultSize);
conv_slider->Bind(wxEVT_SLIDER, &VideoConfigDiag::Event_StereoConvergence, this);
RegisterControl(conv_slider, wxGetTranslation(stereo_convergence_desc));

View File

@ -168,7 +168,7 @@ protected:
void Event_StereoConvergence(wxCommandEvent &ev)
{
vconfig.iStereoConvergence = ev.GetInt();
vconfig.iStereoConvergencePercentage = ev.GetInt();
ev.Skip();
}

View File

@ -63,7 +63,7 @@ void GeometryShaderManager::SetConstants()
constants.stereoparams[0] = constants.stereoparams[1] = 0;
}
constants.stereoparams[2] = (float)(g_ActiveConfig.iStereoConvergenceMinimum + g_ActiveConfig.iStereoConvergence);
constants.stereoparams[2] = (float)(g_ActiveConfig.iStereoConvergence * (g_ActiveConfig.iStereoConvergencePercentage / 100.0f));
dirty = true;
}

View File

@ -44,7 +44,7 @@ VideoConfig::VideoConfig()
// Game-specific stereoscopy settings
bStereoEFBMonoDepth = false;
iStereoDepthPercentage = 100;
iStereoConvergenceMinimum = 0;
iStereoConvergence = 20;
}
void VideoConfig::Load(const std::string& ini_file)
@ -92,7 +92,7 @@ void VideoConfig::Load(const std::string& ini_file)
enhancements->Get("PostProcessingShader", &sPostProcessingShader, "");
enhancements->Get("StereoMode", &iStereoMode, 0);
enhancements->Get("StereoDepth", &iStereoDepth, 20);
enhancements->Get("StereoConvergence", &iStereoConvergence, 20);
enhancements->Get("StereoConvergencePercentage", &iStereoConvergencePercentage, 100);
enhancements->Get("StereoSwapEyes", &bStereoSwapEyes, false);
//currently these settings are not saved in global config, so we could've initialized them directly
@ -222,7 +222,6 @@ void VideoConfig::GameIniLoad()
CHECK_SETTING("Video_Stereoscopy", "StereoEFBMonoDepth", bStereoEFBMonoDepth);
CHECK_SETTING("Video_Stereoscopy", "StereoDepthPercentage", iStereoDepthPercentage);
CHECK_SETTING("Video_Stereoscopy", "StereoConvergenceMinimum", iStereoConvergenceMinimum);
CHECK_SETTING("Video_Hacks", "EFBAccessEnable", bEFBAccessEnable);
CHECK_SETTING("Video_Hacks", "BBoxEnable", bBBoxEnable);
@ -309,7 +308,7 @@ void VideoConfig::Save(const std::string& ini_file)
enhancements->Set("PostProcessingShader", sPostProcessingShader);
enhancements->Set("StereoMode", iStereoMode);
enhancements->Set("StereoDepth", iStereoDepth);
enhancements->Set("StereoConvergence", iStereoConvergence);
enhancements->Set("StereoConvergencePercentage", iStereoConvergencePercentage);
enhancements->Set("StereoSwapEyes", bStereoSwapEyes);
IniFile::Section* hacks = iniFile.GetOrCreateSection("Hacks");

View File

@ -88,10 +88,6 @@ struct VideoConfig final
bool bForceFiltering;
int iMaxAnisotropy;
std::string sPostProcessingShader;
int iStereoMode;
int iStereoDepth;
int iStereoConvergence;
bool bStereoSwapEyes;
std::array<StereoscopyPreset, STEREOSCOPY_PRESETS_NUM> oStereoPresets;
int iStereoActivePreset;
@ -136,9 +132,13 @@ struct VideoConfig final
int iSaveTargetId; // TODO: Should be dropped
// Stereoscopy
int iStereoMode;
int iStereoDepth;
int iStereoConvergence;
int iStereoConvergencePercentage;
bool bStereoSwapEyes;
bool bStereoEFBMonoDepth;
int iStereoDepthPercentage;
int iStereoConvergenceMinimum;
// D3D only config, mostly to be merged into the above
int iAdapter;