diff options
| author | 2014-10-09 19:43:40 -0700 | |
|---|---|---|
| committer | 2014-10-22 15:24:25 -0700 | |
| commit | a59f57d50467bd5dba1f28b8020278d6298babf7 (patch) | |
| tree | 62f1528fcb2815bcb382ea8c606b6fa8fc18ba95 /src/citra_qt | |
| parent | Merge pull request #145 from yuriks/shader-log-crash (diff) | |
| download | yuzu-a59f57d50467bd5dba1f28b8020278d6298babf7.tar.gz yuzu-a59f57d50467bd5dba1f28b8020278d6298babf7.tar.xz yuzu-a59f57d50467bd5dba1f28b8020278d6298babf7.zip | |
Use config files to store whether SDMC is enabled or not
Before, it used to use whether the directory actually existed. As a result, .citra-emu/sdmc was never auto-created (something quite confusing to me until I read through the logs).
Diffstat (limited to '')
| -rw-r--r-- | src/citra_qt/config.cpp | 14 | ||||
| -rw-r--r-- | src/citra_qt/config.h | 3 |
2 files changed, 17 insertions, 0 deletions
diff --git a/src/citra_qt/config.cpp b/src/citra_qt/config.cpp index 1b116edc5..0c4f75a96 100644 --- a/src/citra_qt/config.cpp +++ b/src/citra_qt/config.cpp | |||
| @@ -64,12 +64,26 @@ void Config::SaveControls() { | |||
| 64 | qt_config->endGroup(); | 64 | qt_config->endGroup(); |
| 65 | } | 65 | } |
| 66 | 66 | ||
| 67 | void Config::ReadData() { | ||
| 68 | qt_config->beginGroup("Data Storage"); | ||
| 69 | Settings::values.use_virtual_sd = qt_config->value("use_virtual_sd", true).toBool(); | ||
| 70 | qt_config->endGroup(); | ||
| 71 | } | ||
| 72 | |||
| 73 | void Config::SaveData() { | ||
| 74 | qt_config->beginGroup("Data Storage"); | ||
| 75 | qt_config->setValue("use_virtual_sd", Settings::values.use_virtual_sd); | ||
| 76 | qt_config->endGroup(); | ||
| 77 | } | ||
| 78 | |||
| 67 | void Config::Reload() { | 79 | void Config::Reload() { |
| 68 | ReadControls(); | 80 | ReadControls(); |
| 81 | ReadData(); | ||
| 69 | } | 82 | } |
| 70 | 83 | ||
| 71 | void Config::Save() { | 84 | void Config::Save() { |
| 72 | SaveControls(); | 85 | SaveControls(); |
| 86 | SaveData(); | ||
| 73 | } | 87 | } |
| 74 | 88 | ||
| 75 | Config::~Config() { | 89 | Config::~Config() { |
diff --git a/src/citra_qt/config.h b/src/citra_qt/config.h index ae390be6b..74c9ff11d 100644 --- a/src/citra_qt/config.h +++ b/src/citra_qt/config.h | |||
| @@ -14,6 +14,9 @@ class Config { | |||
| 14 | 14 | ||
| 15 | void ReadControls(); | 15 | void ReadControls(); |
| 16 | void SaveControls(); | 16 | void SaveControls(); |
| 17 | |||
| 18 | void ReadData(); | ||
| 19 | void SaveData(); | ||
| 17 | public: | 20 | public: |
| 18 | Config(); | 21 | Config(); |
| 19 | ~Config(); | 22 | ~Config(); |