diff options
| author | 2016-01-24 21:54:04 +0100 | |
|---|---|---|
| committer | 2016-03-22 21:53:43 +0100 | |
| commit | 3eb737a5f5b199fd3f9951a7060255f46011e9ff (patch) | |
| tree | cc44971ba38dbb0a86929df09e7cd613e583e8a3 /src/citra_qt/config.cpp | |
| parent | Whole config is handled by Config class. (diff) | |
| download | yuzu-3eb737a5f5b199fd3f9951a7060255f46011e9ff.tar.gz yuzu-3eb737a5f5b199fd3f9951a7060255f46011e9ff.tar.xz yuzu-3eb737a5f5b199fd3f9951a7060255f46011e9ff.zip | |
Add more stuff to configure.
Diffstat (limited to 'src/citra_qt/config.cpp')
| -rw-r--r-- | src/citra_qt/config.cpp | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/citra_qt/config.cpp b/src/citra_qt/config.cpp index 981d92a9c..ecf5c5a75 100644 --- a/src/citra_qt/config.cpp +++ b/src/citra_qt/config.cpp | |||
| @@ -82,24 +82,23 @@ void Config::ReadValues() { | |||
| 82 | qt_config->beginGroup("Paths"); | 82 | qt_config->beginGroup("Paths"); |
| 83 | UISettings::values.roms_path = qt_config->value("romsPath").toString(); | 83 | UISettings::values.roms_path = qt_config->value("romsPath").toString(); |
| 84 | UISettings::values.symbols_path = qt_config->value("symbolsPath").toString(); | 84 | UISettings::values.symbols_path = qt_config->value("symbolsPath").toString(); |
| 85 | UISettings::values.gamedir_path = qt_config->value("gameListRootDir", ".").toString(); | 85 | UISettings::values.gamedir = qt_config->value("gameListRootDir", ".").toString(); |
| 86 | UISettings::values.gamedir_deepscan = qt_config->value("gameListDeepScan", false).toBool(); | 86 | UISettings::values.gamedir_deepscan = qt_config->value("gameListDeepScan", false).toBool(); |
| 87 | UISettings::values.recent_files = qt_config->value("recentFiles").toStringList(); | 87 | UISettings::values.recent_files = qt_config->value("recentFiles").toStringList(); |
| 88 | qt_config->endGroup(); | 88 | qt_config->endGroup(); |
| 89 | 89 | ||
| 90 | qt_config->beginGroup("Shortcuts"); | 90 | qt_config->beginGroup("Shortcuts"); |
| 91 | QStringList groups = qt_config->childGroups(); | 91 | QStringList groups = qt_config->childGroups(); |
| 92 | for (auto group : groups) | 92 | for (auto group : groups) { |
| 93 | { | ||
| 94 | qt_config->beginGroup(group); | 93 | qt_config->beginGroup(group); |
| 95 | 94 | ||
| 96 | QStringList hotkeys = qt_config->childGroups(); | 95 | QStringList hotkeys = qt_config->childGroups(); |
| 97 | for (auto hotkey : hotkeys) | 96 | for (auto hotkey : hotkeys) { |
| 98 | { | ||
| 99 | qt_config->beginGroup(hotkey); | 97 | qt_config->beginGroup(hotkey); |
| 100 | UISettings::values.shortcuts.push_back(UISettings::Shortcut(group + "/" + hotkey, | 98 | UISettings::values.shortcuts.emplace_back( |
| 101 | UISettings::ContextedShortcut(qt_config->value("KeySeq").toString(), | 99 | UISettings::Shortcut(group + "/" + hotkey, |
| 102 | qt_config->value("Context").toInt()))); | 100 | UISettings::ContextualShortcut(qt_config->value("KeySeq").toString(), |
| 101 | qt_config->value("Context").toInt()))); | ||
| 103 | qt_config->endGroup(); | 102 | qt_config->endGroup(); |
| 104 | } | 103 | } |
| 105 | 104 | ||
| @@ -109,6 +108,7 @@ void Config::ReadValues() { | |||
| 109 | 108 | ||
| 110 | UISettings::values.single_window_mode = qt_config->value("singleWindowMode", true).toBool(); | 109 | UISettings::values.single_window_mode = qt_config->value("singleWindowMode", true).toBool(); |
| 111 | UISettings::values.display_titlebar = qt_config->value("displayTitleBars", true).toBool(); | 110 | UISettings::values.display_titlebar = qt_config->value("displayTitleBars", true).toBool(); |
| 111 | UISettings::values.confirm_before_closing = qt_config->value("confirmClose",true).toBool(); | ||
| 112 | UISettings::values.first_start = qt_config->value("firstStart", true).toBool(); | 112 | UISettings::values.first_start = qt_config->value("firstStart", true).toBool(); |
| 113 | 113 | ||
| 114 | qt_config->endGroup(); | 114 | qt_config->endGroup(); |
| @@ -167,14 +167,13 @@ void Config::SaveValues() { | |||
| 167 | qt_config->beginGroup("Paths"); | 167 | qt_config->beginGroup("Paths"); |
| 168 | qt_config->setValue("romsPath", UISettings::values.roms_path); | 168 | qt_config->setValue("romsPath", UISettings::values.roms_path); |
| 169 | qt_config->setValue("symbolsPath", UISettings::values.symbols_path); | 169 | qt_config->setValue("symbolsPath", UISettings::values.symbols_path); |
| 170 | qt_config->setValue("gameListRootDir", UISettings::values.gamedir_path); | 170 | qt_config->setValue("gameListRootDir", UISettings::values.gamedir); |
| 171 | qt_config->setValue("gameListDeepScan", UISettings::values.gamedir_deepscan); | 171 | qt_config->setValue("gameListDeepScan", UISettings::values.gamedir_deepscan); |
| 172 | qt_config->setValue("recentFiles", UISettings::values.recent_files); | 172 | qt_config->setValue("recentFiles", UISettings::values.recent_files); |
| 173 | qt_config->endGroup(); | 173 | qt_config->endGroup(); |
| 174 | 174 | ||
| 175 | qt_config->beginGroup("Shortcuts"); | 175 | qt_config->beginGroup("Shortcuts"); |
| 176 | for (auto shortcut : UISettings::values.shortcuts ) | 176 | for (auto shortcut : UISettings::values.shortcuts ) { |
| 177 | { | ||
| 178 | qt_config->setValue(shortcut.first + "/KeySeq", shortcut.second.first); | 177 | qt_config->setValue(shortcut.first + "/KeySeq", shortcut.second.first); |
| 179 | qt_config->setValue(shortcut.first + "/Context", shortcut.second.second); | 178 | qt_config->setValue(shortcut.first + "/Context", shortcut.second.second); |
| 180 | } | 179 | } |
| @@ -182,6 +181,7 @@ void Config::SaveValues() { | |||
| 182 | 181 | ||
| 183 | qt_config->setValue("singleWindowMode", UISettings::values.single_window_mode); | 182 | qt_config->setValue("singleWindowMode", UISettings::values.single_window_mode); |
| 184 | qt_config->setValue("displayTitleBars", UISettings::values.display_titlebar); | 183 | qt_config->setValue("displayTitleBars", UISettings::values.display_titlebar); |
| 184 | qt_config->setValue("confirmClose", UISettings::values.confirm_before_closing); | ||
| 185 | qt_config->setValue("firstStart", UISettings::values.first_start); | 185 | qt_config->setValue("firstStart", UISettings::values.first_start); |
| 186 | 186 | ||
| 187 | qt_config->endGroup(); | 187 | qt_config->endGroup(); |