summaryrefslogtreecommitdiff
path: root/src/input_common/input_mapping.cpp
diff options
context:
space:
mode:
authorGravatar liamwhite2023-02-25 12:44:13 -0500
committerGravatar GitHub2023-02-25 12:44:13 -0500
commit833afb7ce340030593f5d4fcb3cbd59a19530a7f (patch)
treee6f89696755222f2604cdd1a77b6e62dc32cd724 /src/input_common/input_mapping.cpp
parentMerge pull request #9857 from german77/fwupdate (diff)
parentcore: hid: Restore motion state on refresh and clamp motion values (diff)
downloadyuzu-833afb7ce340030593f5d4fcb3cbd59a19530a7f.tar.gz
yuzu-833afb7ce340030593f5d4fcb3cbd59a19530a7f.tar.xz
yuzu-833afb7ce340030593f5d4fcb3cbd59a19530a7f.zip
Merge pull request #9848 from german77/metroid_motion
input_common: Implement dedicated motion from mouse
Diffstat (limited to 'src/input_common/input_mapping.cpp')
-rw-r--r--src/input_common/input_mapping.cpp10
1 files changed, 3 insertions, 7 deletions
diff --git a/src/input_common/input_mapping.cpp b/src/input_common/input_mapping.cpp
index 6990a86b9..2ff480ff9 100644
--- a/src/input_common/input_mapping.cpp
+++ b/src/input_common/input_mapping.cpp
@@ -142,14 +142,10 @@ void MappingFactory::RegisterMotion(const MappingData& data) {
142 new_input.Set("port", static_cast<int>(data.pad.port)); 142 new_input.Set("port", static_cast<int>(data.pad.port));
143 new_input.Set("pad", static_cast<int>(data.pad.pad)); 143 new_input.Set("pad", static_cast<int>(data.pad.pad));
144 144
145 // If engine is mouse map the mouse position as 3 axis motion 145 // If engine is mouse map it automatically to mouse motion
146 if (data.engine == "mouse") { 146 if (data.engine == "mouse") {
147 new_input.Set("axis_x", 1); 147 new_input.Set("motion", 0);
148 new_input.Set("invert_x", "-"); 148 new_input.Set("pad", 1);
149 new_input.Set("axis_y", 0);
150 new_input.Set("axis_z", 4);
151 new_input.Set("range", 1.0f);
152 new_input.Set("deadzone", 0.0f);
153 input_queue.Push(new_input); 149 input_queue.Push(new_input);
154 return; 150 return;
155 } 151 }