summaryrefslogtreecommitdiff
path: root/src/core/hle
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/hle')
-rw-r--r--src/core/hle/service/hid/controllers/mouse.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/core/hle/service/hid/controllers/mouse.cpp b/src/core/hle/service/hid/controllers/mouse.cpp
index 83e69ca94..9c408e7f4 100644
--- a/src/core/hle/service/hid/controllers/mouse.cpp
+++ b/src/core/hle/service/hid/controllers/mouse.cpp
@@ -38,13 +38,14 @@ void Controller_Mouse::OnUpdate(const Core::Timing::CoreTiming& core_timing, u8*
38 if (Settings::values.mouse_enabled) { 38 if (Settings::values.mouse_enabled) {
39 const auto& mouse_button_state = emulated_devices->GetMouseButtons(); 39 const auto& mouse_button_state = emulated_devices->GetMouseButtons();
40 const auto& mouse_position_state = emulated_devices->GetMousePosition(); 40 const auto& mouse_position_state = emulated_devices->GetMousePosition();
41 const auto& mouse_wheel_state = emulated_devices->GetMouseDeltaWheel();
41 next_state.attribute.is_connected.Assign(1); 42 next_state.attribute.is_connected.Assign(1);
42 next_state.x = mouse_position_state.x; 43 next_state.x = static_cast<s32>(mouse_position_state.x * Layout::ScreenUndocked::Width);
43 next_state.y = mouse_position_state.y; 44 next_state.y = static_cast<s32>(mouse_position_state.y * Layout::ScreenUndocked::Height);
44 next_state.delta_x = next_state.x - last_entry.x; 45 next_state.delta_x = next_state.x - last_entry.x;
45 next_state.delta_y = next_state.y - last_entry.y; 46 next_state.delta_y = next_state.y - last_entry.y;
46 next_state.delta_wheel_x = mouse_position_state.delta_wheel_x; 47 next_state.delta_wheel_x = mouse_wheel_state.x;
47 next_state.delta_wheel_y = mouse_position_state.delta_wheel_y; 48 next_state.delta_wheel_y = mouse_wheel_state.y;
48 49
49 next_state.button = mouse_button_state; 50 next_state.button = mouse_button_state;
50 } 51 }