mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-01-09 23:59:27 +01:00
VideoConfig: Change convergence setting to percentage value.
This commit is contained in:
parent
e670d29dfe
commit
ee657c04fe
@ -25,4 +25,4 @@ EFBToTextureEnable = False
|
||||
FastDepthCalc = False
|
||||
|
||||
[Video_Stereoscopy]
|
||||
StereoConvergenceMinimum = 115
|
||||
StereoConvergence = 115
|
||||
|
@ -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
|
||||
|
@ -22,4 +22,4 @@ FastDepthCalc = False
|
||||
SafeTextureCacheColorSamples = 512
|
||||
|
||||
[Video_Stereoscopy]
|
||||
StereoConvergenceMinimum = 26
|
||||
StereoConvergence = 26
|
||||
|
@ -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));
|
||||
|
||||
|
@ -168,7 +168,7 @@ protected:
|
||||
|
||||
void Event_StereoConvergence(wxCommandEvent &ev)
|
||||
{
|
||||
vconfig.iStereoConvergence = ev.GetInt();
|
||||
vconfig.iStereoConvergencePercentage = ev.GetInt();
|
||||
|
||||
ev.Skip();
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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");
|
||||
|
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user