diff options
| author | 2021-10-21 13:56:52 -0500 | |
|---|---|---|
| committer | 2021-11-24 20:30:25 -0600 | |
| commit | b5e72de753ae4de5c5fae7087abb00dc4242451d (patch) | |
| tree | ac1f2b56814bbaaa1a5432c4e1d79c12dd16296d /src/input_common | |
| parent | service/hid: Use ring buffer for gestures (diff) | |
| download | yuzu-b5e72de753ae4de5c5fae7087abb00dc4242451d.tar.gz yuzu-b5e72de753ae4de5c5fae7087abb00dc4242451d.tar.xz yuzu-b5e72de753ae4de5c5fae7087abb00dc4242451d.zip | |
kraken: Address comments from review
review fixes
Diffstat (limited to 'src/input_common')
| -rw-r--r-- | src/input_common/drivers/udp_client.cpp | 2 | ||||
| -rw-r--r-- | src/input_common/drivers/udp_client.h | 4 | ||||
| -rw-r--r-- | src/input_common/helpers/stick_from_buttons.h | 1 | ||||
| -rw-r--r-- | src/input_common/main.cpp | 7 |
4 files changed, 9 insertions, 5 deletions
diff --git a/src/input_common/drivers/udp_client.cpp b/src/input_common/drivers/udp_client.cpp index f0c0a6b8b..192ab336b 100644 --- a/src/input_common/drivers/udp_client.cpp +++ b/src/input_common/drivers/udp_client.cpp | |||
| @@ -268,6 +268,8 @@ void UDPClient::OnPadData(Response::PadData data, std::size_t client) { | |||
| 268 | SetButton(identifier, touch_id, true); | 268 | SetButton(identifier, touch_id, true); |
| 269 | continue; | 269 | continue; |
| 270 | } | 270 | } |
| 271 | SetAxis(identifier, touch_id * 2, 0); | ||
| 272 | SetAxis(identifier, touch_id * 2 + 1, 0); | ||
| 271 | SetButton(identifier, touch_id, false); | 273 | SetButton(identifier, touch_id, false); |
| 272 | } | 274 | } |
| 273 | } | 275 | } |
diff --git a/src/input_common/drivers/udp_client.h b/src/input_common/drivers/udp_client.h index 58b2e921d..639325b17 100644 --- a/src/input_common/drivers/udp_client.h +++ b/src/input_common/drivers/udp_client.h | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | // Copyright 2021 yuzu Emulator Project | 1 | // Copyright 2018 Citra Emulator Project |
| 2 | // Licensed under GPLv2 or any later version | 2 | // Licensed under GPLv2 or any later version |
| 3 | // Refer to the license.txt file included | 3 | // Refer to the license.txt file included. |
| 4 | 4 | ||
| 5 | #pragma once | 5 | #pragma once |
| 6 | 6 | ||
diff --git a/src/input_common/helpers/stick_from_buttons.h b/src/input_common/helpers/stick_from_buttons.h index 1d6e24c98..82dff5ca8 100644 --- a/src/input_common/helpers/stick_from_buttons.h +++ b/src/input_common/helpers/stick_from_buttons.h | |||
| @@ -1,4 +1,3 @@ | |||
| 1 | |||
| 2 | // Copyright 2017 Citra Emulator Project | 1 | // Copyright 2017 Citra Emulator Project |
| 3 | // Licensed under GPLv2 or any later version | 2 | // Licensed under GPLv2 or any later version |
| 4 | // Refer to the license.txt file included. | 3 | // Refer to the license.txt file included. |
diff --git a/src/input_common/main.cpp b/src/input_common/main.cpp index b048783c9..8f7ce59b7 100644 --- a/src/input_common/main.cpp +++ b/src/input_common/main.cpp | |||
| @@ -87,25 +87,30 @@ struct InputSubsystem::Impl { | |||
| 87 | 87 | ||
| 88 | void Shutdown() { | 88 | void Shutdown() { |
| 89 | Input::UnregisterFactory<Input::InputDevice>(keyboard->GetEngineName()); | 89 | Input::UnregisterFactory<Input::InputDevice>(keyboard->GetEngineName()); |
| 90 | Input::UnregisterFactory<Input::OutputDevice>(keyboard->GetEngineName()); | ||
| 90 | keyboard.reset(); | 91 | keyboard.reset(); |
| 91 | 92 | ||
| 92 | Input::UnregisterFactory<Input::InputDevice>(mouse->GetEngineName()); | 93 | Input::UnregisterFactory<Input::InputDevice>(mouse->GetEngineName()); |
| 94 | Input::UnregisterFactory<Input::OutputDevice>(mouse->GetEngineName()); | ||
| 93 | mouse.reset(); | 95 | mouse.reset(); |
| 94 | 96 | ||
| 95 | Input::UnregisterFactory<Input::InputDevice>(touch_screen->GetEngineName()); | 97 | Input::UnregisterFactory<Input::InputDevice>(touch_screen->GetEngineName()); |
| 96 | touch_screen.reset(); | 98 | touch_screen.reset(); |
| 97 | 99 | ||
| 98 | Input::UnregisterFactory<Input::InputDevice>(gcadapter->GetEngineName()); | 100 | Input::UnregisterFactory<Input::InputDevice>(gcadapter->GetEngineName()); |
| 101 | Input::UnregisterFactory<Input::OutputDevice>(gcadapter->GetEngineName()); | ||
| 99 | gcadapter.reset(); | 102 | gcadapter.reset(); |
| 100 | 103 | ||
| 101 | Input::UnregisterFactory<Input::InputDevice>(udp_client->GetEngineName()); | 104 | Input::UnregisterFactory<Input::InputDevice>(udp_client->GetEngineName()); |
| 102 | udp_client.reset(); | 105 | udp_client.reset(); |
| 103 | 106 | ||
| 104 | Input::UnregisterFactory<Input::InputDevice>(tas_input->GetEngineName()); | 107 | Input::UnregisterFactory<Input::InputDevice>(tas_input->GetEngineName()); |
| 108 | Input::UnregisterFactory<Input::OutputDevice>(tas_input->GetEngineName()); | ||
| 105 | tas_input.reset(); | 109 | tas_input.reset(); |
| 106 | 110 | ||
| 107 | #ifdef HAVE_SDL2 | 111 | #ifdef HAVE_SDL2 |
| 108 | Input::UnregisterFactory<Input::InputDevice>(sdl->GetEngineName()); | 112 | Input::UnregisterFactory<Input::InputDevice>(sdl->GetEngineName()); |
| 113 | Input::UnregisterFactory<Input::OutputDevice>(sdl->GetEngineName()); | ||
| 109 | sdl.reset(); | 114 | sdl.reset(); |
| 110 | #endif | 115 | #endif |
| 111 | 116 | ||
| @@ -124,8 +129,6 @@ struct InputSubsystem::Impl { | |||
| 124 | devices.insert(devices.end(), mouse_devices.begin(), mouse_devices.end()); | 129 | devices.insert(devices.end(), mouse_devices.begin(), mouse_devices.end()); |
| 125 | auto gcadapter_devices = gcadapter->GetInputDevices(); | 130 | auto gcadapter_devices = gcadapter->GetInputDevices(); |
| 126 | devices.insert(devices.end(), gcadapter_devices.begin(), gcadapter_devices.end()); | 131 | devices.insert(devices.end(), gcadapter_devices.begin(), gcadapter_devices.end()); |
| 127 | auto tas_input_devices = tas_input->GetInputDevices(); | ||
| 128 | devices.insert(devices.end(), tas_input_devices.begin(), tas_input_devices.end()); | ||
| 129 | #ifdef HAVE_SDL2 | 132 | #ifdef HAVE_SDL2 |
| 130 | auto sdl_devices = sdl->GetInputDevices(); | 133 | auto sdl_devices = sdl->GetInputDevices(); |
| 131 | devices.insert(devices.end(), sdl_devices.begin(), sdl_devices.end()); | 134 | devices.insert(devices.end(), sdl_devices.begin(), sdl_devices.end()); |