summaryrefslogtreecommitdiffstats
path: root/src/citra_qt
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2014-12-01 05:17:45 +0100
committerbunnei <bunneidev@gmail.com>2014-12-01 05:17:45 +0100
commit1827bb1fcc66b9578002bdfc627603cd945618e8 (patch)
tree5eb27c9e3bc9e547c4aca271cfc0998930933bae /src/citra_qt
parentMerge pull request #225 from bunnei/fix-release-mutex (diff)
parentMerge Config::ReadXYZs (diff)
downloadyuzu-1827bb1fcc66b9578002bdfc627603cd945618e8.tar
yuzu-1827bb1fcc66b9578002bdfc627603cd945618e8.tar.gz
yuzu-1827bb1fcc66b9578002bdfc627603cd945618e8.tar.bz2
yuzu-1827bb1fcc66b9578002bdfc627603cd945618e8.tar.lz
yuzu-1827bb1fcc66b9578002bdfc627603cd945618e8.tar.xz
yuzu-1827bb1fcc66b9578002bdfc627603cd945618e8.tar.zst
yuzu-1827bb1fcc66b9578002bdfc627603cd945618e8.zip
Diffstat (limited to 'src/citra_qt')
-rw-r--r--src/citra_qt/config.cpp52
-rw-r--r--src/citra_qt/config.h11
2 files changed, 19 insertions, 44 deletions
diff --git a/src/citra_qt/config.cpp b/src/citra_qt/config.cpp
index 09fce4d6f..3209e5900 100644
--- a/src/citra_qt/config.cpp
+++ b/src/citra_qt/config.cpp
@@ -21,7 +21,7 @@ Config::Config() {
Reload();
}
-void Config::ReadControls() {
+void Config::ReadValues() {
qt_config->beginGroup("Controls");
Settings::values.pad_a_key = qt_config->value("pad_a", Qt::Key_A).toInt();
Settings::values.pad_b_key = qt_config->value("pad_b", Qt::Key_S).toInt();
@@ -41,9 +41,22 @@ void Config::ReadControls() {
Settings::values.pad_sleft_key = qt_config->value("pad_sleft", Qt::Key_Left).toInt();
Settings::values.pad_sright_key = qt_config->value("pad_sright", Qt::Key_Right).toInt();
qt_config->endGroup();
+
+ qt_config->beginGroup("Core");
+ Settings::values.cpu_core = qt_config->value("cpu_core", Core::CPU_Interpreter).toInt();
+ Settings::values.gpu_refresh_rate = qt_config->value("gpu_refresh_rate", 60).toInt();
+ qt_config->endGroup();
+
+ qt_config->beginGroup("Data Storage");
+ Settings::values.use_virtual_sd = qt_config->value("use_virtual_sd", true).toBool();
+ qt_config->endGroup();
+
+ qt_config->beginGroup("Miscellaneous");
+ Settings::values.enable_log = qt_config->value("enable_log", true).toBool();
+ qt_config->endGroup();
}
-void Config::SaveControls() {
+void Config::SaveValues() {
qt_config->beginGroup("Controls");
qt_config->setValue("pad_a", Settings::values.pad_a_key);
qt_config->setValue("pad_b", Settings::values.pad_b_key);
@@ -63,58 +76,27 @@ void Config::SaveControls() {
qt_config->setValue("pad_sleft", Settings::values.pad_sleft_key);
qt_config->setValue("pad_sright", Settings::values.pad_sright_key);
qt_config->endGroup();
-}
-
-void Config::ReadCore() {
- qt_config->beginGroup("Core");
- Settings::values.cpu_core = qt_config->value("cpu_core", Core::CPU_Interpreter).toInt();
- Settings::values.gpu_refresh_rate = qt_config->value("gpu_refresh_rate", 60).toInt();
- qt_config->endGroup();
-}
-void Config::SaveCore() {
qt_config->beginGroup("Core");
qt_config->setValue("cpu_core", Settings::values.cpu_core);
qt_config->setValue("gpu_refresh_rate", Settings::values.gpu_refresh_rate);
qt_config->endGroup();
-}
-
-void Config::ReadData() {
- qt_config->beginGroup("Data Storage");
- Settings::values.use_virtual_sd = qt_config->value("use_virtual_sd", true).toBool();
- qt_config->endGroup();
-}
-void Config::SaveData() {
qt_config->beginGroup("Data Storage");
qt_config->setValue("use_virtual_sd", Settings::values.use_virtual_sd);
qt_config->endGroup();
-}
-
-void Config::ReadMiscellaneous() {
- qt_config->beginGroup("Miscellaneous");
- Settings::values.enable_log = qt_config->value("enable_log", true).toBool();
- qt_config->endGroup();
-}
-void Config::SaveMiscellaneous() {
qt_config->beginGroup("Miscellaneous");
qt_config->setValue("enable_log", Settings::values.enable_log);
qt_config->endGroup();
}
void Config::Reload() {
- ReadControls();
- ReadCore();
- ReadData();
- ReadMiscellaneous();
+ ReadValues();
}
void Config::Save() {
- SaveControls();
- SaveCore();
- SaveData();
- SaveMiscellaneous();
+ SaveValues();
}
Config::~Config() {
diff --git a/src/citra_qt/config.h b/src/citra_qt/config.h
index 8c6568cb2..4c95d0cb9 100644
--- a/src/citra_qt/config.h
+++ b/src/citra_qt/config.h
@@ -12,15 +12,8 @@ class Config {
QSettings* qt_config;
std::string qt_config_loc;
- void ReadControls();
- void SaveControls();
- void ReadCore();
- void SaveCore();
- void ReadData();
- void SaveData();
-
- void ReadMiscellaneous();
- void SaveMiscellaneous();
+ void ReadValues();
+ void SaveValues();
public:
Config();
~Config();