diff --git a/src/citra_qt/config/QLineEditKeyConfig.cpp b/src/citra_qt/config/QLineEditKeyConfig.cpp index ffb2f7049..b9101bfa4 100644 --- a/src/citra_qt/config/QLineEditKeyConfig.cpp +++ b/src/citra_qt/config/QLineEditKeyConfig.cpp @@ -9,15 +9,6 @@ using namespace Settings::NativeInput; -std::map ButtonNameMap({ - { A, "A" }, { B, "B" }, { X, "X" }, { Y, "Y" }, - { L, "L" }, { R, "R" }, { ZL, "ZL" }, { ZR, "ZR" }, - { DLEFT, "D-Left" }, { DRIGHT, "D-Right" }, { DUP, "D-Up" }, { DDOWN, "D-Down" }, - { SLEFT, "S-Left" }, { SRIGHT, "S-Right" }, { SUP, "S-Up" }, { SDOWN, "S-Down" }, - { CLEFT, "C-Left" }, { CRIGHT, "C-Right" }, { CUP, "C-Up" }, { CDOWN, "C-Down" }, - { START, "Start" }, { SELECT, "Select" }, { HOME, "Home" } } -); - QLineEditKeyConfig::QLineEditKeyConfig(Values button, QWidget* parent) : QLineEdit(parent), button(button) {} diff --git a/src/citra_qt/config/QLineEditKeyConfig.h b/src/citra_qt/config/QLineEditKeyConfig.h index 944953beb..95cd2397f 100644 --- a/src/citra_qt/config/QLineEditKeyConfig.h +++ b/src/citra_qt/config/QLineEditKeyConfig.h @@ -11,9 +11,6 @@ class QKeyEvent; -/// Map a button to its name -extern std::map ButtonNameMap; - /// The LineEdits used for button configuration class QLineEditKeyConfig : public QLineEdit { Q_OBJECT diff --git a/src/citra_qt/config/inputs.cpp b/src/citra_qt/config/inputs.cpp index b6eb4abb6..0e2de4c67 100644 --- a/src/citra_qt/config/inputs.cpp +++ b/src/citra_qt/config/inputs.cpp @@ -24,6 +24,15 @@ GInputsDialog::GInputsDialog(QWidget* parent) : QDialog(parent) { lineEdits[i]->setFocusPolicy(Qt::ClickFocus); } + std::string labelArray[] = { + "A:", "B:", "X:", "Y:", + "L:", "R:", "ZL:", "ZR:", + "D-Left:", "D-Right:", "D-Up:", "D-Down:", + "S-Left:", "S-Right:", "S-Up:", "S-Down:", + "C-Left:", "C-Right:", "C-Up:", "C-Down:", + "Start:", "Select:", "Home:" + }; + // put the lineEdits and their labels into a grid QGridLayout* grid = new QGridLayout(); size_t size = lineEdits.size(); @@ -32,7 +41,7 @@ GInputsDialog::GInputsDialog(QWidget* parent) : QDialog(parent) { int row = i % NUM_ROW; int labelColumn = (int)i / NUM_ROW * 2; QLineEditKeyConfig* lineEdit = lineEdits[i]; - QLabel* label = new QLabel(tr(ButtonNameMap[lineEdit->button].c_str())); + QLabel* label = new QLabel(tr(labelArray[lineEdit->button].c_str())); grid->addWidget(label, row, labelColumn); grid->addWidget(lineEdit, row, labelColumn + 1);