diff options
author | liamwhite <liamwhite@users.noreply.github.com> | 2023-02-18 22:25:48 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-18 22:25:48 +0100 |
commit | e531d1fae986addc7253e14bcc569c38ab50ccb0 (patch) | |
tree | 82b68c763271ac1d15112a536136f7462cacadfb /src/core | |
parent | Merge pull request #9825 from liamwhite/object-name (diff) | |
parent | input_common: Split mouse input into individual devices (diff) | |
download | yuzu-e531d1fae986addc7253e14bcc569c38ab50ccb0.tar yuzu-e531d1fae986addc7253e14bcc569c38ab50ccb0.tar.gz yuzu-e531d1fae986addc7253e14bcc569c38ab50ccb0.tar.bz2 yuzu-e531d1fae986addc7253e14bcc569c38ab50ccb0.tar.lz yuzu-e531d1fae986addc7253e14bcc569c38ab50ccb0.tar.xz yuzu-e531d1fae986addc7253e14bcc569c38ab50ccb0.tar.zst yuzu-e531d1fae986addc7253e14bcc569c38ab50ccb0.zip |
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/hid/emulated_console.cpp | 3 | ||||
-rw-r--r-- | src/core/hid/emulated_devices.cpp | 3 |
2 files changed, 5 insertions, 1 deletions
diff --git a/src/core/hid/emulated_console.cpp b/src/core/hid/emulated_console.cpp index 1c91bbe40..17d663379 100644 --- a/src/core/hid/emulated_console.cpp +++ b/src/core/hid/emulated_console.cpp @@ -23,7 +23,8 @@ void EmulatedConsole::SetTouchParams() { // We can't use mouse as touch if native mouse is enabled if (!Settings::values.mouse_enabled) { - touch_params[index++] = Common::ParamPackage{"engine:mouse,axis_x:10,axis_y:11,button:0"}; + touch_params[index++] = + Common::ParamPackage{"engine:mouse,axis_x:0,axis_y:1,button:0,port:2"}; } touch_params[index++] = diff --git a/src/core/hid/emulated_devices.cpp b/src/core/hid/emulated_devices.cpp index 836f32c0f..578a6ff61 100644 --- a/src/core/hid/emulated_devices.cpp +++ b/src/core/hid/emulated_devices.cpp @@ -34,9 +34,12 @@ void EmulatedDevices::ReloadInput() { // First two axis are reserved for mouse position key_index = 2; for (auto& mouse_device : mouse_analog_devices) { + // Mouse axis are only mapped on port 1, pad 0 Common::ParamPackage mouse_params; mouse_params.Set("engine", "mouse"); mouse_params.Set("axis", static_cast<int>(key_index)); + mouse_params.Set("port", 1); + mouse_params.Set("pad", 0); mouse_device = Common::Input::CreateInputDevice(mouse_params); key_index++; } |