diff options
| author | 2022-12-20 12:49:43 -0600 | |
|---|---|---|
| committer | 2023-01-19 18:05:20 -0600 | |
| commit | 18c9f8eeed64196088969904d16095721ed66a3c (patch) | |
| tree | 11427a74b7c105ba21130e4da249badc9ebd0e35 /src | |
| parent | input_common: Disable SDL driver with switch controllers (diff) | |
| download | yuzu-18c9f8eeed64196088969904d16095721ed66a3c.tar.gz yuzu-18c9f8eeed64196088969904d16095721ed66a3c.tar.xz yuzu-18c9f8eeed64196088969904d16095721ed66a3c.zip | |
yuzu: Update controller colors and button names
Diffstat (limited to 'src')
| -rw-r--r-- | src/yuzu/configuration/configure_input_player.cpp | 20 | ||||
| -rw-r--r-- | src/yuzu/configuration/configure_input_player_widget.cpp | 10 |
2 files changed, 27 insertions, 3 deletions
diff --git a/src/yuzu/configuration/configure_input_player.cpp b/src/yuzu/configuration/configure_input_player.cpp index c40d980c9..4b7e3b01b 100644 --- a/src/yuzu/configuration/configure_input_player.cpp +++ b/src/yuzu/configuration/configure_input_player.cpp | |||
| @@ -66,6 +66,18 @@ QString GetButtonName(Common::Input::ButtonNames button_name) { | |||
| 66 | return QObject::tr("R"); | 66 | return QObject::tr("R"); |
| 67 | case Common::Input::ButtonNames::TriggerL: | 67 | case Common::Input::ButtonNames::TriggerL: |
| 68 | return QObject::tr("L"); | 68 | return QObject::tr("L"); |
| 69 | case Common::Input::ButtonNames::TriggerZR: | ||
| 70 | return QObject::tr("ZR"); | ||
| 71 | case Common::Input::ButtonNames::TriggerZL: | ||
| 72 | return QObject::tr("ZL"); | ||
| 73 | case Common::Input::ButtonNames::TriggerSR: | ||
| 74 | return QObject::tr("SR"); | ||
| 75 | case Common::Input::ButtonNames::TriggerSL: | ||
| 76 | return QObject::tr("SL"); | ||
| 77 | case Common::Input::ButtonNames::ButtonStickL: | ||
| 78 | return QObject::tr("Stick L"); | ||
| 79 | case Common::Input::ButtonNames::ButtonStickR: | ||
| 80 | return QObject::tr("Stick R"); | ||
| 69 | case Common::Input::ButtonNames::ButtonA: | 81 | case Common::Input::ButtonNames::ButtonA: |
| 70 | return QObject::tr("A"); | 82 | return QObject::tr("A"); |
| 71 | case Common::Input::ButtonNames::ButtonB: | 83 | case Common::Input::ButtonNames::ButtonB: |
| @@ -76,6 +88,14 @@ QString GetButtonName(Common::Input::ButtonNames button_name) { | |||
| 76 | return QObject::tr("Y"); | 88 | return QObject::tr("Y"); |
| 77 | case Common::Input::ButtonNames::ButtonStart: | 89 | case Common::Input::ButtonNames::ButtonStart: |
| 78 | return QObject::tr("Start"); | 90 | return QObject::tr("Start"); |
| 91 | case Common::Input::ButtonNames::ButtonPlus: | ||
| 92 | return QObject::tr("Plus"); | ||
| 93 | case Common::Input::ButtonNames::ButtonMinus: | ||
| 94 | return QObject::tr("Minus"); | ||
| 95 | case Common::Input::ButtonNames::ButtonHome: | ||
| 96 | return QObject::tr("Home"); | ||
| 97 | case Common::Input::ButtonNames::ButtonCapture: | ||
| 98 | return QObject::tr("Capture"); | ||
| 79 | case Common::Input::ButtonNames::L1: | 99 | case Common::Input::ButtonNames::L1: |
| 80 | return QObject::tr("L1"); | 100 | return QObject::tr("L1"); |
| 81 | case Common::Input::ButtonNames::L2: | 101 | case Common::Input::ButtonNames::L2: |
diff --git a/src/yuzu/configuration/configure_input_player_widget.cpp b/src/yuzu/configuration/configure_input_player_widget.cpp index 11390fec0..68af6c20c 100644 --- a/src/yuzu/configuration/configure_input_player_widget.cpp +++ b/src/yuzu/configuration/configure_input_player_widget.cpp | |||
| @@ -103,9 +103,13 @@ void PlayerControlPreview::UpdateColors() { | |||
| 103 | 103 | ||
| 104 | colors.left = colors.primary; | 104 | colors.left = colors.primary; |
| 105 | colors.right = colors.primary; | 105 | colors.right = colors.primary; |
| 106 | // Possible alternative to set colors from settings | 106 | |
| 107 | // colors.left = QColor(controller->GetColors().left.body); | 107 | const auto color_left = controller->GetColorsValues()[0].body; |
| 108 | // colors.right = QColor(controller->GetColors().right.body); | 108 | const auto color_right = controller->GetColorsValues()[1].body; |
| 109 | if (color_left != 0 && color_right != 0) { | ||
| 110 | colors.left = QColor(color_left); | ||
| 111 | colors.right = QColor(color_right); | ||
| 112 | } | ||
| 109 | } | 113 | } |
| 110 | 114 | ||
| 111 | void PlayerControlPreview::ResetInputs() { | 115 | void PlayerControlPreview::ResetInputs() { |