diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/core/hle/service/hid/controllers/gesture.cpp | 7 | ||||
| -rw-r--r-- | src/core/hle/service/hid/controllers/gesture.h | 3 |
2 files changed, 4 insertions, 6 deletions
diff --git a/src/core/hle/service/hid/controllers/gesture.cpp b/src/core/hle/service/hid/controllers/gesture.cpp index 07b3a6095..86e9f4ea8 100644 --- a/src/core/hle/service/hid/controllers/gesture.cpp +++ b/src/core/hle/service/hid/controllers/gesture.cpp | |||
| @@ -145,8 +145,7 @@ void Controller_Gesture::UpdateGestureSharedMemory(u8* data, std::size_t size, | |||
| 145 | cur_entry.detection_count = gesture.detection_count; | 145 | cur_entry.detection_count = gesture.detection_count; |
| 146 | cur_entry.type = type; | 146 | cur_entry.type = type; |
| 147 | cur_entry.attributes = attributes; | 147 | cur_entry.attributes = attributes; |
| 148 | cur_entry.x = gesture.mid_point.x; | 148 | cur_entry.pos = gesture.mid_point; |
| 149 | cur_entry.y = gesture.mid_point.y; | ||
| 150 | cur_entry.point_count = static_cast<s32>(gesture.active_points); | 149 | cur_entry.point_count = static_cast<s32>(gesture.active_points); |
| 151 | for (size_t id = 0; id < MAX_POINTS; id++) { | 150 | for (size_t id = 0; id < MAX_POINTS; id++) { |
| 152 | cur_entry.points[id].x = gesture.points[id].x; | 151 | cur_entry.points[id].x = gesture.points[id].x; |
| @@ -262,8 +261,8 @@ void Controller_Gesture::UpdatePanEvent(GestureProperties& gesture, | |||
| 262 | auto& cur_entry = shared_memory.gesture_states[shared_memory.header.last_entry_index]; | 261 | auto& cur_entry = shared_memory.gesture_states[shared_memory.header.last_entry_index]; |
| 263 | const auto& last_entry = | 262 | const auto& last_entry = |
| 264 | shared_memory.gesture_states[(shared_memory.header.last_entry_index + 16) % 17]; | 263 | shared_memory.gesture_states[(shared_memory.header.last_entry_index + 16) % 17]; |
| 265 | cur_entry.delta_x = gesture.mid_point.x - last_entry.x; | 264 | cur_entry.delta_x = gesture.mid_point.x - last_entry.pos.x; |
| 266 | cur_entry.delta_y = gesture.mid_point.y - last_entry.y; | 265 | cur_entry.delta_y = gesture.mid_point.y - last_entry.pos.y; |
| 267 | 266 | ||
| 268 | cur_entry.vel_x = static_cast<f32>(cur_entry.delta_x) / time_difference; | 267 | cur_entry.vel_x = static_cast<f32>(cur_entry.delta_x) / time_difference; |
| 269 | cur_entry.vel_y = static_cast<f32>(cur_entry.delta_y) / time_difference; | 268 | cur_entry.vel_y = static_cast<f32>(cur_entry.delta_y) / time_difference; |
diff --git a/src/core/hle/service/hid/controllers/gesture.h b/src/core/hle/service/hid/controllers/gesture.h index 619b6f3dc..809303131 100644 --- a/src/core/hle/service/hid/controllers/gesture.h +++ b/src/core/hle/service/hid/controllers/gesture.h | |||
| @@ -77,8 +77,7 @@ private: | |||
| 77 | s64_le detection_count; | 77 | s64_le detection_count; |
| 78 | TouchType type; | 78 | TouchType type; |
| 79 | Direction direction; | 79 | Direction direction; |
| 80 | s32_le x; | 80 | Point pos; |
| 81 | s32_le y; | ||
| 82 | s32_le delta_x; | 81 | s32_le delta_x; |
| 83 | s32_le delta_y; | 82 | s32_le delta_y; |
| 84 | f32 vel_x; | 83 | f32 vel_x; |