Merge pull request #3350 from Armada651/video-stereoscopy
VideoConfig: Move all stereoscopy options to the stereoscopy section.
This commit is contained in:
commit
a55af16131
|
@ -66,10 +66,10 @@ public final class UserPreferences
|
||||||
editor.putBoolean("disableFog", getConfig("gfx_opengl.ini", "Settings", "DisableFog", "False").equals("True"));
|
editor.putBoolean("disableFog", getConfig("gfx_opengl.ini", "Settings", "DisableFog", "False").equals("True"));
|
||||||
editor.putBoolean("skipEFBAccess", getConfig("gfx_opengl.ini", "Hacks", "EFBAccessEnable", "False").equals("True"));
|
editor.putBoolean("skipEFBAccess", getConfig("gfx_opengl.ini", "Hacks", "EFBAccessEnable", "False").equals("True"));
|
||||||
editor.putBoolean("ignoreFormatChanges", getConfig("gfx_opengl.ini", "Hacks", "EFBEmulateFormatChanges", "False").equals("True"));
|
editor.putBoolean("ignoreFormatChanges", getConfig("gfx_opengl.ini", "Hacks", "EFBEmulateFormatChanges", "False").equals("True"));
|
||||||
editor.putString("stereoscopyMode", getConfig("gfx_opengl.ini", "Enhancements", "StereoMode", "0"));
|
editor.putString("stereoscopyMode", getConfig("gfx_opengl.ini", "Stereoscopy", "StereoMode", "0"));
|
||||||
editor.putBoolean("stereoSwapEyes", getConfig("gfx_opengl.ini", "Enhancements", "StereoSwapEyes", "False").equals("True"));
|
editor.putBoolean("stereoSwapEyes", getConfig("gfx_opengl.ini", "Stereoscopy", "StereoSwapEyes", "False").equals("True"));
|
||||||
editor.putString("stereoDepth", getConfig("gfx_opengl.ini", "Enhancements", "StereoDepth", "20"));
|
editor.putString("stereoDepth", getConfig("gfx_opengl.ini", "Stereoscopy", "StereoDepth", "20"));
|
||||||
editor.putString("stereoConvergence", getConfig("gfx_opengl.ini", "Enhancements", "StereoConvergence", "20"));
|
editor.putString("stereoConvergencePercentage", getConfig("gfx_opengl.ini", "Stereoscopy", "StereoConvergencePercentage", "100"));
|
||||||
editor.putBoolean("enableController1", getConfig("Dolphin.ini", "Settings", "SIDevice0", "6") == "6");
|
editor.putBoolean("enableController1", getConfig("Dolphin.ini", "Settings", "SIDevice0", "6") == "6");
|
||||||
editor.putBoolean("enableController2", getConfig("Dolphin.ini", "Settings", "SIDevice1", "0") == "6");
|
editor.putBoolean("enableController2", getConfig("Dolphin.ini", "Settings", "SIDevice1", "0") == "6");
|
||||||
editor.putBoolean("enableController3", getConfig("Dolphin.ini", "Settings", "SIDevice2", "0") == "6");
|
editor.putBoolean("enableController3", getConfig("Dolphin.ini", "Settings", "SIDevice2", "0") == "6");
|
||||||
|
@ -212,7 +212,7 @@ public final class UserPreferences
|
||||||
String stereoscopySeparation = prefs.getString("stereoDepth", "20");
|
String stereoscopySeparation = prefs.getString("stereoDepth", "20");
|
||||||
|
|
||||||
// Stereoscopy convergence
|
// Stereoscopy convergence
|
||||||
String stereoscopyConvergence = prefs.getString("stereoConvergence", "20");
|
String stereoConvergencePercentage = prefs.getString("stereoConvergencePercentage", "100");
|
||||||
|
|
||||||
// Controllers
|
// Controllers
|
||||||
// Controller 1 never gets disconnected due to touch screen
|
// Controller 1 never gets disconnected due to touch screen
|
||||||
|
@ -294,10 +294,10 @@ public final class UserPreferences
|
||||||
NativeLibrary.SetConfig("gfx_opengl.ini", "Settings", "EnablePixelLighting", usingPerPixelLighting ? "True" : "False");
|
NativeLibrary.SetConfig("gfx_opengl.ini", "Settings", "EnablePixelLighting", usingPerPixelLighting ? "True" : "False");
|
||||||
NativeLibrary.SetConfig("gfx_opengl.ini", "Enhancements", "ForceFiltering", isForcingTextureFiltering ? "True" : "False");
|
NativeLibrary.SetConfig("gfx_opengl.ini", "Enhancements", "ForceFiltering", isForcingTextureFiltering ? "True" : "False");
|
||||||
NativeLibrary.SetConfig("gfx_opengl.ini", "Settings", "DisableFog", fogIsDisabled ? "True" : "False");
|
NativeLibrary.SetConfig("gfx_opengl.ini", "Settings", "DisableFog", fogIsDisabled ? "True" : "False");
|
||||||
NativeLibrary.SetConfig("gfx_opengl.ini", "Enhancements", "StereoMode", stereoscopyMode);
|
NativeLibrary.SetConfig("gfx_opengl.ini", "Stereoscopy", "StereoMode", stereoscopyMode);
|
||||||
NativeLibrary.SetConfig("gfx_opengl.ini", "Enhancements", "StereoSwapEyes", stereoscopyEyeSwap ? "True" : "False");
|
NativeLibrary.SetConfig("gfx_opengl.ini", "Stereoscopy", "StereoSwapEyes", stereoscopyEyeSwap ? "True" : "False");
|
||||||
NativeLibrary.SetConfig("gfx_opengl.ini", "Enhancements", "StereoDepth", stereoscopySeparation);
|
NativeLibrary.SetConfig("gfx_opengl.ini", "Stereoscopy", "StereoDepth", stereoscopySeparation);
|
||||||
NativeLibrary.SetConfig("gfx_opengl.ini", "Enhancements", "StereoConvergence", stereoscopyConvergence);
|
NativeLibrary.SetConfig("gfx_opengl.ini", "Stereoscopy", "StereoConvergence", stereoConvergencePercentage);
|
||||||
NativeLibrary.SetConfig("Dolphin.ini", "Settings", "SIDevice0", "6");
|
NativeLibrary.SetConfig("Dolphin.ini", "Settings", "SIDevice0", "6");
|
||||||
NativeLibrary.SetConfig("Dolphin.ini", "Settings", "SIDevice1", enableController2 ? "6" : "0");
|
NativeLibrary.SetConfig("Dolphin.ini", "Settings", "SIDevice1", enableController2 ? "6" : "0");
|
||||||
NativeLibrary.SetConfig("Dolphin.ini", "Settings", "SIDevice2", enableController3 ? "6" : "0");
|
NativeLibrary.SetConfig("Dolphin.ini", "Settings", "SIDevice2", enableController3 ? "6" : "0");
|
||||||
|
|
|
@ -357,13 +357,13 @@ void CISOProperties::CreateGUIControls()
|
||||||
sDepthPercentage->Add(DepthPercentageText);
|
sDepthPercentage->Add(DepthPercentageText);
|
||||||
sDepthPercentage->Add(DepthPercentage);
|
sDepthPercentage->Add(DepthPercentage);
|
||||||
|
|
||||||
wxBoxSizer* const sConvergenceMinimum = new wxBoxSizer(wxHORIZONTAL);
|
wxBoxSizer* const sConvergence = new wxBoxSizer(wxHORIZONTAL);
|
||||||
wxStaticText* const ConvergenceMinimumText = new wxStaticText(m_GameConfig, wxID_ANY, _("Convergence Minimum: "));
|
wxStaticText* const ConvergenceText = new wxStaticText(m_GameConfig, wxID_ANY, _("Convergence: "));
|
||||||
ConvergenceMinimum = new wxSpinCtrl(m_GameConfig, ID_CONVERGENCEMINIMUM);
|
Convergence = new wxSpinCtrl(m_GameConfig, ID_CONVERGENCE);
|
||||||
ConvergenceMinimum->SetRange(0, INT32_MAX);
|
Convergence->SetRange(0, INT32_MAX);
|
||||||
ConvergenceMinimum->SetToolTip(_("This value is added to the convergence value set in the graphics configuration."));
|
Convergence->SetToolTip(_("This value is added to the convergence value set in the graphics configuration."));
|
||||||
sConvergenceMinimum->Add(ConvergenceMinimumText);
|
sConvergence->Add(ConvergenceText);
|
||||||
sConvergenceMinimum->Add(ConvergenceMinimum);
|
sConvergence->Add(Convergence);
|
||||||
|
|
||||||
MonoDepth = new wxCheckBox(m_GameConfig, ID_MONODEPTH, _("Monoscopic Shadows"), wxDefaultPosition, wxDefaultSize, GetElementStyle("Video_Stereoscopy", "StereoEFBMonoDepth"));
|
MonoDepth = new wxCheckBox(m_GameConfig, ID_MONODEPTH, _("Monoscopic Shadows"), wxDefaultPosition, wxDefaultSize, GetElementStyle("Video_Stereoscopy", "StereoEFBMonoDepth"));
|
||||||
MonoDepth->SetToolTip(_("Use a single depth buffer for both eyes. Needed for a few games."));
|
MonoDepth->SetToolTip(_("Use a single depth buffer for both eyes. Needed for a few games."));
|
||||||
|
@ -403,7 +403,7 @@ void CISOProperties::CreateGUIControls()
|
||||||
wxStaticBoxSizer* const sbStereoOverrides =
|
wxStaticBoxSizer* const sbStereoOverrides =
|
||||||
new wxStaticBoxSizer(wxVERTICAL, m_GameConfig, _("Stereoscopy"));
|
new wxStaticBoxSizer(wxVERTICAL, m_GameConfig, _("Stereoscopy"));
|
||||||
sbStereoOverrides->Add(sDepthPercentage);
|
sbStereoOverrides->Add(sDepthPercentage);
|
||||||
sbStereoOverrides->Add(sConvergenceMinimum);
|
sbStereoOverrides->Add(sConvergence);
|
||||||
sbStereoOverrides->Add(MonoDepth);
|
sbStereoOverrides->Add(MonoDepth);
|
||||||
|
|
||||||
wxStaticBoxSizer * const sbGameConfig = new wxStaticBoxSizer(wxVERTICAL, m_GameConfig, _("Game-Specific Settings"));
|
wxStaticBoxSizer * const sbGameConfig = new wxStaticBoxSizer(wxVERTICAL, m_GameConfig, _("Game-Specific Settings"));
|
||||||
|
@ -1073,9 +1073,9 @@ void CISOProperties::LoadGameConfig()
|
||||||
default_stereoscopy->Get("StereoDepthPercentage", &iTemp, 100);
|
default_stereoscopy->Get("StereoDepthPercentage", &iTemp, 100);
|
||||||
GameIniLocal.GetIfExists("Video_Stereoscopy", "StereoDepthPercentage", &iTemp);
|
GameIniLocal.GetIfExists("Video_Stereoscopy", "StereoDepthPercentage", &iTemp);
|
||||||
DepthPercentage->SetValue(iTemp);
|
DepthPercentage->SetValue(iTemp);
|
||||||
default_stereoscopy->Get("StereoConvergenceMinimum", &iTemp, 0);
|
default_stereoscopy->Get("StereoConvergence", &iTemp, 0);
|
||||||
GameIniLocal.GetIfExists("Video_Stereoscopy", "StereoConvergenceMinimum", &iTemp);
|
GameIniLocal.GetIfExists("Video_Stereoscopy", "StereoConvergence", &iTemp);
|
||||||
ConvergenceMinimum->SetValue(iTemp);
|
Convergence->SetValue(iTemp);
|
||||||
|
|
||||||
PatchList_Load();
|
PatchList_Load();
|
||||||
ActionReplayList_Load();
|
ActionReplayList_Load();
|
||||||
|
@ -1154,7 +1154,7 @@ bool CISOProperties::SaveGameConfig()
|
||||||
|
|
||||||
int depth = DepthPercentage->GetValue() > 0 ? DepthPercentage->GetValue() : 100;
|
int depth = DepthPercentage->GetValue() > 0 ? DepthPercentage->GetValue() : 100;
|
||||||
SAVE_IF_NOT_DEFAULT("Video_Stereoscopy", "StereoDepthPercentage", depth, 100);
|
SAVE_IF_NOT_DEFAULT("Video_Stereoscopy", "StereoDepthPercentage", depth, 100);
|
||||||
SAVE_IF_NOT_DEFAULT("Video_Stereoscopy", "StereoConvergenceMinimum", ConvergenceMinimum->GetValue(), 0);
|
SAVE_IF_NOT_DEFAULT("Video_Stereoscopy", "StereoConvergence", Convergence->GetValue(), 0);
|
||||||
|
|
||||||
PatchList_Save();
|
PatchList_Save();
|
||||||
ActionReplayList_Save();
|
ActionReplayList_Save();
|
||||||
|
|
|
@ -98,7 +98,7 @@ private:
|
||||||
|
|
||||||
// Stereoscopy
|
// Stereoscopy
|
||||||
wxSlider* DepthPercentage;
|
wxSlider* DepthPercentage;
|
||||||
wxSpinCtrl* ConvergenceMinimum;
|
wxSpinCtrl* Convergence;
|
||||||
wxCheckBox* MonoDepth;
|
wxCheckBox* MonoDepth;
|
||||||
|
|
||||||
wxArrayString arrayStringFor_EmuState;
|
wxArrayString arrayStringFor_EmuState;
|
||||||
|
@ -171,7 +171,7 @@ private:
|
||||||
ID_REMOVECHEAT,
|
ID_REMOVECHEAT,
|
||||||
ID_GPUDETERMINISM,
|
ID_GPUDETERMINISM,
|
||||||
ID_DEPTHPERCENTAGE,
|
ID_DEPTHPERCENTAGE,
|
||||||
ID_CONVERGENCEMINIMUM,
|
ID_CONVERGENCE,
|
||||||
ID_MONODEPTH,
|
ID_MONODEPTH,
|
||||||
|
|
||||||
ID_NAME,
|
ID_NAME,
|
||||||
|
|
|
@ -91,19 +91,21 @@ void VideoConfig::Load(const std::string& ini_file)
|
||||||
enhancements->Get("ForceFiltering", &bForceFiltering, 0);
|
enhancements->Get("ForceFiltering", &bForceFiltering, 0);
|
||||||
enhancements->Get("MaxAnisotropy", &iMaxAnisotropy, 0); // NOTE - this is x in (1 << x)
|
enhancements->Get("MaxAnisotropy", &iMaxAnisotropy, 0); // NOTE - this is x in (1 << x)
|
||||||
enhancements->Get("PostProcessingShader", &sPostProcessingShader, "");
|
enhancements->Get("PostProcessingShader", &sPostProcessingShader, "");
|
||||||
enhancements->Get("StereoMode", &iStereoMode, 0);
|
|
||||||
enhancements->Get("StereoDepth", &iStereoDepth, 20);
|
IniFile::Section* stereoscopy = iniFile.GetOrCreateSection("Stereoscopy");
|
||||||
enhancements->Get("StereoConvergencePercentage", &iStereoConvergencePercentage, 100);
|
stereoscopy->Get("StereoMode", &iStereoMode, 0);
|
||||||
enhancements->Get("StereoSwapEyes", &bStereoSwapEyes, false);
|
stereoscopy->Get("StereoDepth", &iStereoDepth, 20);
|
||||||
|
stereoscopy->Get("StereoConvergencePercentage", &iStereoConvergencePercentage, 100);
|
||||||
|
stereoscopy->Get("StereoSwapEyes", &bStereoSwapEyes, false);
|
||||||
|
|
||||||
//currently these settings are not saved in global config, so we could've initialized them directly
|
//currently these settings are not saved in global config, so we could've initialized them directly
|
||||||
for (size_t i = 0; i < oStereoPresets.size(); ++i)
|
for (size_t i = 0; i < oStereoPresets.size(); ++i)
|
||||||
{
|
{
|
||||||
enhancements->Get(StringFromFormat("StereoConvergence_%zu", i), &oStereoPresets[i].depth, iStereoConvergence);
|
stereoscopy->Get(StringFromFormat("StereoConvergencePercentage_%zu", i), &oStereoPresets[i].convergence, iStereoConvergencePercentage);
|
||||||
enhancements->Get(StringFromFormat("StereoDepth_%zu", i), &oStereoPresets[i].convergence, iStereoDepth);
|
stereoscopy->Get(StringFromFormat("StereoDepth_%zu", i), &oStereoPresets[i].depth, iStereoDepth);
|
||||||
}
|
}
|
||||||
enhancements->Get("StereoActivePreset", &iStereoActivePreset, 0);
|
stereoscopy->Get("StereoActivePreset", &iStereoActivePreset, 0);
|
||||||
iStereoConvergence = oStereoPresets[iStereoActivePreset].convergence;
|
iStereoConvergencePercentage = oStereoPresets[iStereoActivePreset].convergence;
|
||||||
iStereoDepth = oStereoPresets[iStereoActivePreset].depth;
|
iStereoDepth = oStereoPresets[iStereoActivePreset].depth;
|
||||||
|
|
||||||
IniFile::Section* hacks = iniFile.GetOrCreateSection("Hacks");
|
IniFile::Section* hacks = iniFile.GetOrCreateSection("Hacks");
|
||||||
|
@ -205,22 +207,22 @@ void VideoConfig::GameIniLoad()
|
||||||
CHECK_SETTING("Video_Enhancements", "ForceFiltering", bForceFiltering);
|
CHECK_SETTING("Video_Enhancements", "ForceFiltering", bForceFiltering);
|
||||||
CHECK_SETTING("Video_Enhancements", "MaxAnisotropy", iMaxAnisotropy); // NOTE - this is x in (1 << x)
|
CHECK_SETTING("Video_Enhancements", "MaxAnisotropy", iMaxAnisotropy); // NOTE - this is x in (1 << x)
|
||||||
CHECK_SETTING("Video_Enhancements", "PostProcessingShader", sPostProcessingShader);
|
CHECK_SETTING("Video_Enhancements", "PostProcessingShader", sPostProcessingShader);
|
||||||
CHECK_SETTING("Video_Enhancements", "StereoMode", iStereoMode);
|
|
||||||
CHECK_SETTING("Video_Enhancements", "StereoDepth", iStereoDepth);
|
|
||||||
CHECK_SETTING("Video_Enhancements", "StereoConvergence", iStereoConvergence);
|
|
||||||
CHECK_SETTING("Video_Enhancements", "StereoSwapEyes", bStereoSwapEyes);
|
|
||||||
|
|
||||||
//these are not overrides, they are per-game settings, hence no warning
|
//these are not overrides, they are per-game settings, hence no warning
|
||||||
IniFile::Section* enhancements = iniFile.GetOrCreateSection("Enhancements");
|
IniFile::Section* stereoscopy = iniFile.GetOrCreateSection("Stereoscopy");
|
||||||
for (size_t i = 0; i < oStereoPresets.size(); ++i)
|
for (size_t i = 0; i < oStereoPresets.size(); ++i)
|
||||||
{
|
{
|
||||||
enhancements->Get(StringFromFormat("StereoConvergence_%zu", i), &oStereoPresets[i].depth, iStereoConvergence);
|
stereoscopy->Get(StringFromFormat("StereoConvergencePercentage_%zu", i), &oStereoPresets[i].convergence, iStereoConvergencePercentage);
|
||||||
enhancements->Get(StringFromFormat("StereoDepth_%zu", i), &oStereoPresets[i].convergence, iStereoDepth);
|
stereoscopy->Get(StringFromFormat("StereoDepth_%zu", i), &oStereoPresets[i].depth, iStereoDepth);
|
||||||
}
|
}
|
||||||
enhancements->Get("StereoActivePreset", &iStereoActivePreset, 0);
|
stereoscopy->Get("StereoActivePreset", &iStereoActivePreset, 0);
|
||||||
iStereoConvergence = oStereoPresets[iStereoActivePreset].convergence;
|
iStereoConvergencePercentage = oStereoPresets[iStereoActivePreset].convergence;
|
||||||
iStereoDepth = oStereoPresets[iStereoActivePreset].depth;
|
iStereoDepth = oStereoPresets[iStereoActivePreset].depth;
|
||||||
|
|
||||||
|
CHECK_SETTING("Video_Stereoscopy", "StereoMode", iStereoMode);
|
||||||
|
CHECK_SETTING("Video_Stereoscopy", "StereoDepth", iStereoDepth);
|
||||||
|
CHECK_SETTING("Video_Stereoscopy", "StereoConvergence", iStereoConvergence);
|
||||||
|
CHECK_SETTING("Video_Stereoscopy", "StereoSwapEyes", bStereoSwapEyes);
|
||||||
CHECK_SETTING("Video_Stereoscopy", "StereoEFBMonoDepth", bStereoEFBMonoDepth);
|
CHECK_SETTING("Video_Stereoscopy", "StereoEFBMonoDepth", bStereoEFBMonoDepth);
|
||||||
CHECK_SETTING("Video_Stereoscopy", "StereoDepthPercentage", iStereoDepthPercentage);
|
CHECK_SETTING("Video_Stereoscopy", "StereoDepthPercentage", iStereoDepthPercentage);
|
||||||
|
|
||||||
|
@ -317,10 +319,12 @@ void VideoConfig::Save(const std::string& ini_file)
|
||||||
enhancements->Set("ForceFiltering", bForceFiltering);
|
enhancements->Set("ForceFiltering", bForceFiltering);
|
||||||
enhancements->Set("MaxAnisotropy", iMaxAnisotropy);
|
enhancements->Set("MaxAnisotropy", iMaxAnisotropy);
|
||||||
enhancements->Set("PostProcessingShader", sPostProcessingShader);
|
enhancements->Set("PostProcessingShader", sPostProcessingShader);
|
||||||
enhancements->Set("StereoMode", iStereoMode);
|
|
||||||
enhancements->Set("StereoDepth", iStereoDepth);
|
IniFile::Section* stereoscopy = iniFile.GetOrCreateSection("Stereoscopy");
|
||||||
enhancements->Set("StereoConvergencePercentage", iStereoConvergencePercentage);
|
stereoscopy->Set("StereoMode", iStereoMode);
|
||||||
enhancements->Set("StereoSwapEyes", bStereoSwapEyes);
|
stereoscopy->Set("StereoDepth", iStereoDepth);
|
||||||
|
stereoscopy->Set("StereoConvergencePercentage", iStereoConvergencePercentage);
|
||||||
|
stereoscopy->Set("StereoSwapEyes", bStereoSwapEyes);
|
||||||
|
|
||||||
IniFile::Section* hacks = iniFile.GetOrCreateSection("Hacks");
|
IniFile::Section* hacks = iniFile.GetOrCreateSection("Hacks");
|
||||||
hacks->Set("EFBAccessEnable", bEFBAccessEnable);
|
hacks->Set("EFBAccessEnable", bEFBAccessEnable);
|
||||||
|
|
Loading…
Reference in New Issue