summaryrefslogtreecommitdiff
path: root/Source/Core/DolphinWX/SoftwareVideoConfigDialog.cpp
diff options
context:
space:
mode:
authorMerryMage <MerryMage@users.noreply.github.com>2017-05-18 13:59:38 +0100
committerMerryMage <MerryMage@users.noreply.github.com>2017-06-03 18:13:02 +0100
commitf5f45855f03a7396dce07cdd65017e9b1ab5bfe7 (patch)
tree96cdb46685ba94f5c8f2f6ac3fc2ba17d05de1e7 /Source/Core/DolphinWX/SoftwareVideoConfigDialog.cpp
parentd75b536fd7809dab10bb2e0194312673e977a3fe (diff)
GameConfigLoader: Add GFX Game INI translations
Diffstat (limited to 'Source/Core/DolphinWX/SoftwareVideoConfigDialog.cpp')
-rw-r--r--Source/Core/DolphinWX/SoftwareVideoConfigDialog.cpp34
1 files changed, 16 insertions, 18 deletions
diff --git a/Source/Core/DolphinWX/SoftwareVideoConfigDialog.cpp b/Source/Core/DolphinWX/SoftwareVideoConfigDialog.cpp
index 046a7343d6..af1ab0485a 100644
--- a/Source/Core/DolphinWX/SoftwareVideoConfigDialog.cpp
+++ b/Source/Core/DolphinWX/SoftwareVideoConfigDialog.cpp
@@ -15,19 +15,20 @@
#include <wx/textctrl.h>
#include "Common/FileUtil.h"
+#include "Core/Config/GraphicsSettings.h"
#include "Core/Core.h"
#include "DolphinWX/SoftwareVideoConfigDialog.h"
#include "DolphinWX/VideoConfigDiag.h"
#include "DolphinWX/WxUtils.h"
-template <typename T>
-IntegerSetting<T>::IntegerSetting(wxWindow* parent, const wxString& label, T& setting, int minVal,
- int maxVal, long style)
+IntegerSetting::IntegerSetting(wxWindow* parent, const wxString& label,
+ const Config::ConfigInfo<int>& setting, int minVal, int maxVal,
+ long style)
: wxSpinCtrl(parent, wxID_ANY, label, wxDefaultPosition, wxDefaultSize, style),
m_setting(setting)
{
SetRange(minVal, maxVal);
- SetValue(m_setting);
+ SetValue(Config::Get(m_setting));
Bind(wxEVT_SPINCTRL, &IntegerSetting::UpdateValue, this);
}
@@ -35,9 +36,6 @@ SoftwareVideoConfigDialog::SoftwareVideoConfigDialog(wxWindow* parent, const std
: wxDialog(parent, wxID_ANY,
wxString(wxString::Format(_("Dolphin %s Graphics Configuration"), title)))
{
- VideoConfig& vconfig = g_Config;
- vconfig.Load(File::GetUserPath(D_CONFIG_IDX) + "GFX.ini");
-
wxNotebook* const notebook = new wxNotebook(this, wxID_ANY);
const int space5 = FromDIP(5);
@@ -82,7 +80,7 @@ SoftwareVideoConfigDialog::SoftwareVideoConfigDialog(wxWindow* parent, const std
// xfb
szr_rendering->Add(
- new SettingCheckBox(page_general, _("Bypass XFB"), "", vconfig.bUseXFB, true));
+ new SettingCheckBox(page_general, _("Bypass XFB"), "", Config::GFX_USE_XFB, true));
}
// - info
@@ -95,8 +93,8 @@ SoftwareVideoConfigDialog::SoftwareVideoConfigDialog(wxWindow* parent, const std
group_info->Add(szr_info, 0, wxEXPAND | wxLEFT | wxRIGHT, space5);
group_info->AddSpacer(space5);
- szr_info->Add(
- new SettingCheckBox(page_general, _("Various Statistics"), "", vconfig.bOverlayStats));
+ szr_info->Add(new SettingCheckBox(page_general, _("Various Statistics"), "",
+ Config::GFX_OVERLAY_STATS));
}
// - utility
@@ -110,9 +108,9 @@ SoftwareVideoConfigDialog::SoftwareVideoConfigDialog(wxWindow* parent, const std
group_utility->AddSpacer(space5);
szr_utility->Add(
- new SettingCheckBox(page_general, _("Dump Textures"), "", vconfig.bDumpTextures));
+ new SettingCheckBox(page_general, _("Dump Textures"), "", Config::GFX_DUMP_TEXTURES));
szr_utility->Add(
- new SettingCheckBox(page_general, _("Dump Objects"), "", vconfig.bDumpObjects));
+ new SettingCheckBox(page_general, _("Dump Objects"), "", Config::GFX_SW_DUMP_OBJECTS));
// - debug only
wxStaticBoxSizer* const group_debug_only_utility =
@@ -124,10 +122,10 @@ SoftwareVideoConfigDialog::SoftwareVideoConfigDialog(wxWindow* parent, const std
group_debug_only_utility->Add(szr_debug_only_utility, 0, wxEXPAND | wxBOTTOM, space5);
group_debug_only_utility->AddSpacer(space5);
- szr_debug_only_utility->Add(
- new SettingCheckBox(page_general, _("Dump TEV Stages"), "", vconfig.bDumpTevStages));
+ szr_debug_only_utility->Add(new SettingCheckBox(page_general, _("Dump TEV Stages"), "",
+ Config::GFX_SW_DUMP_TEV_STAGES));
szr_debug_only_utility->Add(new SettingCheckBox(page_general, _("Dump Texture Fetches"), "",
- vconfig.bDumpTevTextureFetches));
+ Config::GFX_SW_DUMP_TEV_TEX_FETCHES));
}
// - misc
@@ -141,8 +139,8 @@ SoftwareVideoConfigDialog::SoftwareVideoConfigDialog(wxWindow* parent, const std
group_misc->AddSpacer(space5);
szr_misc->Add(
- new IntegerSetting<int>(page_general, _("Start"), vconfig.drawStart, 0, 100000));
- szr_misc->Add(new IntegerSetting<int>(page_general, _("End"), vconfig.drawEnd, 0, 100000));
+ new IntegerSetting(page_general, _("Start"), Config::GFX_SW_DRAW_START, 0, 100000));
+ szr_misc->Add(new IntegerSetting(page_general, _("End"), Config::GFX_SW_DRAW_END, 0, 100000));
}
szr_general->AddSpacer(space5);
@@ -168,5 +166,5 @@ SoftwareVideoConfigDialog::SoftwareVideoConfigDialog(wxWindow* parent, const std
SoftwareVideoConfigDialog::~SoftwareVideoConfigDialog()
{
- g_Config.Save((File::GetUserPath(D_CONFIG_IDX) + "GFX.ini").c_str());
+ Config::Save();
}