summaryrefslogtreecommitdiffstats
path: root/src/core/hid/emulated_controller.cpp
diff options
context:
space:
mode:
authorgerman77 <juangerman-13@hotmail.com>2021-10-31 16:41:44 +0100
committerNarr the Reg <juangerman-13@hotmail.com>2021-11-25 03:30:26 +0100
commit730f07830247cfcdc551c253d30c6717fc16316c (patch)
tree9a0d7dbee51ad20e4a174c1be08816289a586d6a /src/core/hid/emulated_controller.cpp
parentkraken: Address comments from review (diff)
downloadyuzu-730f07830247cfcdc551c253d30c6717fc16316c.tar
yuzu-730f07830247cfcdc551c253d30c6717fc16316c.tar.gz
yuzu-730f07830247cfcdc551c253d30c6717fc16316c.tar.bz2
yuzu-730f07830247cfcdc551c253d30c6717fc16316c.tar.lz
yuzu-730f07830247cfcdc551c253d30c6717fc16316c.tar.xz
yuzu-730f07830247cfcdc551c253d30c6717fc16316c.tar.zst
yuzu-730f07830247cfcdc551c253d30c6717fc16316c.zip
Diffstat (limited to 'src/core/hid/emulated_controller.cpp')
-rw-r--r--src/core/hid/emulated_controller.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/core/hid/emulated_controller.cpp b/src/core/hid/emulated_controller.cpp
index 49893cdbd..9a1864279 100644
--- a/src/core/hid/emulated_controller.cpp
+++ b/src/core/hid/emulated_controller.cpp
@@ -77,7 +77,12 @@ void EmulatedController::ReloadFromSettings() {
controller.colors_state.fullkey = controller.colors_state.left;
- SetNpadType(MapSettingsTypeToNPad(player.controller_type));
+ // Other or debug controller should always be a pro controller
+ if (npad_id_type != NpadIdType::Other) {
+ SetNpadType(MapSettingsTypeToNPad(player.controller_type));
+ } else {
+ SetNpadType(NpadType::ProController);
+ }
if (player.connected) {
Connect();
@@ -606,12 +611,12 @@ void EmulatedController::SetTrigger(Common::Input::CallbackStatus callback, std:
switch (index) {
case Settings::NativeTrigger::LTrigger:
controller.gc_trigger_state.left = static_cast<s32>(trigger.analog.value * HID_TRIGGER_MAX);
- controller.npad_button_state.zl.Assign(trigger.pressed);
+ controller.npad_button_state.zl.Assign(trigger.pressed.value);
break;
case Settings::NativeTrigger::RTrigger:
controller.gc_trigger_state.right =
static_cast<s32>(trigger.analog.value * HID_TRIGGER_MAX);
- controller.npad_button_state.zr.Assign(trigger.pressed);
+ controller.npad_button_state.zr.Assign(trigger.pressed.value);
break;
}