diff options
| author | 2021-11-14 21:28:38 -0600 | |
|---|---|---|
| committer | 2021-11-24 20:30:28 -0600 | |
| commit | f4e5f89e6fb9d68cd4ba7d98c281584c50f0e149 (patch) | |
| tree | 9e9f9114d9b7528e74e78102279411595632f048 /src/core/hid/emulated_devices.cpp | |
| parent | core/hid: Fully implement native mouse (diff) | |
| download | yuzu-f4e5f89e6fb9d68cd4ba7d98c281584c50f0e149.tar.gz yuzu-f4e5f89e6fb9d68cd4ba7d98c281584c50f0e149.tar.xz yuzu-f4e5f89e6fb9d68cd4ba7d98c281584c50f0e149.zip | |
core/hid: Improve accuary of mouse implementation
Diffstat (limited to 'src/core/hid/emulated_devices.cpp')
| -rw-r--r-- | src/core/hid/emulated_devices.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/core/hid/emulated_devices.cpp b/src/core/hid/emulated_devices.cpp index 70a494097..874780ec2 100644 --- a/src/core/hid/emulated_devices.cpp +++ b/src/core/hid/emulated_devices.cpp | |||
| @@ -376,9 +376,9 @@ void EmulatedDevices::SetMouseAnalog(Common::Input::CallbackStatus callback, std | |||
| 376 | 376 | ||
| 377 | void EmulatedDevices::SetMouseStick(Common::Input::CallbackStatus callback) { | 377 | void EmulatedDevices::SetMouseStick(Common::Input::CallbackStatus callback) { |
| 378 | std::lock_guard lock{mutex}; | 378 | std::lock_guard lock{mutex}; |
| 379 | const auto stick_value = TransformToStick(callback); | 379 | const auto touch_value = TransformToTouch(callback); |
| 380 | 380 | ||
| 381 | device_status.mouse_stick_value = stick_value; | 381 | device_status.mouse_stick_value = touch_value; |
| 382 | 382 | ||
| 383 | if (is_configuring) { | 383 | if (is_configuring) { |
| 384 | device_status.mouse_position_state = {}; | 384 | device_status.mouse_position_state = {}; |
| @@ -386,8 +386,8 @@ void EmulatedDevices::SetMouseStick(Common::Input::CallbackStatus callback) { | |||
| 386 | return; | 386 | return; |
| 387 | } | 387 | } |
| 388 | 388 | ||
| 389 | device_status.mouse_position_state.x = stick_value.x.value; | 389 | device_status.mouse_position_state.x = touch_value.x.value; |
| 390 | device_status.mouse_position_state.y = stick_value.y.value; | 390 | device_status.mouse_position_state.y = touch_value.y.value; |
| 391 | 391 | ||
| 392 | TriggerOnChange(DeviceTriggerType::Mouse); | 392 | TriggerOnChange(DeviceTriggerType::Mouse); |
| 393 | } | 393 | } |
| @@ -420,7 +420,7 @@ MousePosition EmulatedDevices::GetMousePosition() const { | |||
| 420 | return device_status.mouse_position_state; | 420 | return device_status.mouse_position_state; |
| 421 | } | 421 | } |
| 422 | 422 | ||
| 423 | AnalogStickState EmulatedDevices::GetMouseDeltaWheel() const { | 423 | AnalogStickState EmulatedDevices::GetMouseWheel() const { |
| 424 | return device_status.mouse_wheel_state; | 424 | return device_status.mouse_wheel_state; |
| 425 | } | 425 | } |
| 426 | 426 | ||