Merge pull request #6649 from german77/toggle_sdl

input_common: Support SDL toggle buttons
This commit is contained in:
bunnei
2021-07-20 20:35:20 -04:00
committed by GitHub
2 changed files with 53 additions and 5 deletions

View File

@ -149,8 +149,9 @@ QString ButtonToText(const Common::ParamPackage& param) {
if (param.Has("button")) {
const QString button_str = QString::fromStdString(param.Get("button", ""));
const QString toggle = QString::fromStdString(param.Get("toggle", false) ? "~" : "");
return QObject::tr("Button %1").arg(button_str);
return QObject::tr("%1Button %2").arg(toggle, button_str);
}
if (param.Has("motion")) {