summaryrefslogtreecommitdiff
path: root/src/core/hid/emulated_controller.cpp
diff options
context:
space:
mode:
authorGravatar german772021-11-08 20:28:09 -0600
committerGravatar Narr the Reg2021-11-24 20:30:28 -0600
commit71f9b90dd90c442425900ee16af8b4e39ac54aed (patch)
treeffd9c7d6fdd3ab7d9e2ef0f439968906b36c8d53 /src/core/hid/emulated_controller.cpp
parentsettings: Remove includes of core.h (diff)
downloadyuzu-71f9b90dd90c442425900ee16af8b4e39ac54aed.tar.gz
yuzu-71f9b90dd90c442425900ee16af8b4e39ac54aed.tar.xz
yuzu-71f9b90dd90c442425900ee16af8b4e39ac54aed.zip
core/hid: Remove usage of native types, fix a couple of errors with motion
Diffstat (limited to 'src/core/hid/emulated_controller.cpp')
-rw-r--r--src/core/hid/emulated_controller.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/core/hid/emulated_controller.cpp b/src/core/hid/emulated_controller.cpp
index a9038e06f..54c1a2324 100644
--- a/src/core/hid/emulated_controller.cpp
+++ b/src/core/hid/emulated_controller.cpp
@@ -347,7 +347,7 @@ void EmulatedController::RestoreConfig() {
347} 347}
348 348
349std::vector<Common::ParamPackage> EmulatedController::GetMappedDevices( 349std::vector<Common::ParamPackage> EmulatedController::GetMappedDevices(
350 DeviceIndex device_index) const { 350 EmulatedDeviceIndex device_index) const {
351 std::vector<Common::ParamPackage> devices; 351 std::vector<Common::ParamPackage> devices;
352 for (const auto& param : button_params) { 352 for (const auto& param : button_params) {
353 if (!param.Has("engine")) { 353 if (!param.Has("engine")) {
@@ -704,7 +704,7 @@ void EmulatedController::SetMotion(Common::Input::CallbackStatus callback, std::
704 motion.gyro = emulated.GetGyroscope(); 704 motion.gyro = emulated.GetGyroscope();
705 motion.rotation = emulated.GetRotations(); 705 motion.rotation = emulated.GetRotations();
706 motion.orientation = emulated.GetOrientation(); 706 motion.orientation = emulated.GetOrientation();
707 motion.is_at_rest = emulated.IsMoving(motion_sensitivity); 707 motion.is_at_rest = !emulated.IsMoving(motion_sensitivity);
708 708
709 TriggerOnChange(ControllerTriggerType::Motion, true); 709 TriggerOnChange(ControllerTriggerType::Motion, true);
710} 710}