summaryrefslogtreecommitdiff
path: root/src/citra_qt/config.cpp
diff options
context:
space:
mode:
authorGravatar Anon2016-07-29 07:45:49 -0500
committerGravatar bunnei2016-07-29 08:45:49 -0400
commite91327c86a863b9419fd3695b2400a52336ec3b5 (patch)
treeec914c0dbd050f8063fa5dac0204f3ff0d5b035b /src/citra_qt/config.cpp
parentMerge pull request #1950 from JamePeng/fix-apt-0x0055004-and-0x00560000 (diff)
downloadyuzu-e91327c86a863b9419fd3695b2400a52336ec3b5.tar.gz
yuzu-e91327c86a863b9419fd3695b2400a52336ec3b5.tar.xz
yuzu-e91327c86a863b9419fd3695b2400a52336ec3b5.zip
Input GUI: Add tab to remap controls (#1900)
Diffstat (limited to 'src/citra_qt/config.cpp')
-rw-r--r--src/citra_qt/config.cpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/citra_qt/config.cpp b/src/citra_qt/config.cpp
index ba7edaff9..0e5f285c0 100644
--- a/src/citra_qt/config.cpp
+++ b/src/citra_qt/config.cpp
@@ -3,14 +3,11 @@
3// Refer to the license.txt file included. 3// Refer to the license.txt file included.
4 4
5#include <QSettings> 5#include <QSettings>
6#include <QString>
7#include <QStringList>
8 6
9#include "citra_qt/config.h" 7#include "citra_qt/config.h"
10#include "citra_qt/ui_settings.h" 8#include "citra_qt/ui_settings.h"
11 9
12#include "common/file_util.h" 10#include "common/file_util.h"
13#include "core/settings.h"
14 11
15Config::Config() { 12Config::Config() {
16 // TODO: Don't hardcode the path; let the frontend decide where to put the config files. 13 // TODO: Don't hardcode the path; let the frontend decide where to put the config files.
@@ -21,7 +18,7 @@ Config::Config() {
21 Reload(); 18 Reload();
22} 19}
23 20
24static const std::array<QVariant, Settings::NativeInput::NUM_INPUTS> defaults = { 21const std::array<QVariant, Settings::NativeInput::NUM_INPUTS> Config::defaults = {
25 // directly mapped keys 22 // directly mapped keys
26 Qt::Key_A, Qt::Key_S, Qt::Key_Z, Qt::Key_X, 23 Qt::Key_A, Qt::Key_S, Qt::Key_Z, Qt::Key_X,
27 Qt::Key_Q, Qt::Key_W, Qt::Key_1, Qt::Key_2, 24 Qt::Key_Q, Qt::Key_W, Qt::Key_1, Qt::Key_2,
@@ -109,7 +106,7 @@ void Config::ReadValues() {
109 UISettings::values.shortcuts.emplace_back( 106 UISettings::values.shortcuts.emplace_back(
110 UISettings::Shortcut(group + "/" + hotkey, 107 UISettings::Shortcut(group + "/" + hotkey,
111 UISettings::ContextualShortcut(qt_config->value("KeySeq").toString(), 108 UISettings::ContextualShortcut(qt_config->value("KeySeq").toString(),
112 qt_config->value("Context").toInt()))); 109 qt_config->value("Context").toInt())));
113 qt_config->endGroup(); 110 qt_config->endGroup();
114 } 111 }
115 112
@@ -191,7 +188,7 @@ void Config::SaveValues() {
191 qt_config->endGroup(); 188 qt_config->endGroup();
192 189
193 qt_config->beginGroup("Shortcuts"); 190 qt_config->beginGroup("Shortcuts");
194 for (auto shortcut : UISettings::values.shortcuts ) { 191 for (auto shortcut : UISettings::values.shortcuts) {
195 qt_config->setValue(shortcut.first + "/KeySeq", shortcut.second.first); 192 qt_config->setValue(shortcut.first + "/KeySeq", shortcut.second.first);
196 qt_config->setValue(shortcut.first + "/Context", shortcut.second.second); 193 qt_config->setValue(shortcut.first + "/Context", shortcut.second.second);
197 } 194 }