summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/core/hle/service/hid/hid.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/core/hle/service/hid/hid.cpp b/src/core/hle/service/hid/hid.cpp
index b27ab6d9b..1053d0f40 100644
--- a/src/core/hle/service/hid/hid.cpp
+++ b/src/core/hle/service/hid/hid.cpp
@@ -83,17 +83,17 @@ void Update() {
83 PadState changed = { { (state.hex ^ old_state.hex) } }; 83 PadState changed = { { (state.hex ^ old_state.hex) } };
84 84
85 // Get the current Pad entry 85 // Get the current Pad entry
86 PadDataEntry* pad_entry = &mem->pad.entries[mem->pad.index]; 86 PadDataEntry& pad_entry = mem->pad.entries[mem->pad.index];
87 87
88 // Update entry properties 88 // Update entry properties
89 pad_entry->current_state.hex = state.hex; 89 pad_entry.current_state.hex = state.hex;
90 pad_entry->delta_additions.hex = changed.hex & state.hex; 90 pad_entry.delta_additions.hex = changed.hex & state.hex;
91 pad_entry->delta_removals.hex = changed.hex & old_state.hex;; 91 pad_entry.delta_removals.hex = changed.hex & old_state.hex;;
92 92
93 // Set circle Pad 93 // Set circle Pad
94 pad_entry->circle_pad_x = state.circle_left ? -MAX_CIRCLEPAD_POS : 94 pad_entry.circle_pad_x = state.circle_left ? -MAX_CIRCLEPAD_POS :
95 state.circle_right ? MAX_CIRCLEPAD_POS : 0x0; 95 state.circle_right ? MAX_CIRCLEPAD_POS : 0x0;
96 pad_entry->circle_pad_y = state.circle_down ? -MAX_CIRCLEPAD_POS : 96 pad_entry.circle_pad_y = state.circle_down ? -MAX_CIRCLEPAD_POS :
97 state.circle_up ? MAX_CIRCLEPAD_POS : 0x0; 97 state.circle_up ? MAX_CIRCLEPAD_POS : 0x0;
98 98
99 // If we just updated index 0, provide a new timestamp 99 // If we just updated index 0, provide a new timestamp
@@ -106,11 +106,11 @@ void Update() {
106 next_touch_index = (next_touch_index + 1) % mem->touch.entries.size(); 106 next_touch_index = (next_touch_index + 1) % mem->touch.entries.size();
107 107
108 // Get the current touch entry 108 // Get the current touch entry
109 TouchDataEntry* touch_entry = &mem->touch.entries[mem->touch.index]; 109 TouchDataEntry& touch_entry = mem->touch.entries[mem->touch.index];
110 bool pressed = false; 110 bool pressed = false;
111 111
112 std::tie(touch_entry->x, touch_entry->y, pressed) = VideoCore::g_emu_window->GetTouchState(); 112 std::tie(touch_entry.x, touch_entry.y, pressed) = VideoCore::g_emu_window->GetTouchState();
113 touch_entry->valid.Assign(pressed ? 1 : 0); 113 touch_entry.valid.Assign(pressed ? 1 : 0);
114 114
115 // TODO(bunnei): We're not doing anything with offset 0xA8 + 0x18 of HID SharedMemory, which 115 // TODO(bunnei): We're not doing anything with offset 0xA8 + 0x18 of HID SharedMemory, which
116 // supposedly is "Touch-screen entry, which contains the raw coordinate data prior to being 116 // supposedly is "Touch-screen entry, which contains the raw coordinate data prior to being