Skip to content

Commit

Permalink
Add GamepadInfoList select combobox.
Browse files Browse the repository at this point in the history
Signed-off-by: Melvin Li <[email protected]>
  • Loading branch information
Zalafina committed Aug 13, 2024
1 parent 6be3b7d commit a6f6ff1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions QKeyMapper/qkeymapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8300,9 +8300,9 @@ void QKeyMapper::on_addmapdataButton_clicked()
static QRegularExpression gamepadinfo_regex(R"(^\[(\d)\] (.*?) \[VID=0x([0-9A-F]+)\]\[PID=0x([0-9A-F]+)\](?:\[ViGEM\])$)");
QRegularExpressionMatch gamepadinfo_match = gamepadinfo_regex.match(gamepadselect_string);
if (gamepadinfo_match.hasMatch()) {
QString player_index = gamepadinfo_match.captured(1);
if (m_GamepadInfoMap.contains(player_index)) {
currentOriKeyText = QString("%1@%2").arg(currentOriKeyText, QString::number(player_index));
QString player_index_string = gamepadinfo_match.captured(1);
if (m_GamepadInfoMap.contains(player_index_string.toInt())) {
currentOriKeyText = QString("%1@%2").arg(currentOriKeyText, player_index_string);
}
}
}
Expand Down

0 comments on commit a6f6ff1

Please sign in to comment.