diff options
author | bunnei <bunneidev@gmail.com> | 2016-03-26 19:09:26 +0100 |
---|---|---|
committer | bunnei <bunneidev@gmail.com> | 2016-03-26 19:09:26 +0100 |
commit | e366f60cff290d76cf0876dcf7d07240dae0d12d (patch) | |
tree | 5319db9aa51130baf0cce63d85a5419eadea820e /src/core/hle/service | |
parent | Merge pull request #1549 from wwylele/acc_gyro (diff) | |
parent | use reference instead of pointer (diff) | |
download | yuzu-e366f60cff290d76cf0876dcf7d07240dae0d12d.tar yuzu-e366f60cff290d76cf0876dcf7d07240dae0d12d.tar.gz yuzu-e366f60cff290d76cf0876dcf7d07240dae0d12d.tar.bz2 yuzu-e366f60cff290d76cf0876dcf7d07240dae0d12d.tar.lz yuzu-e366f60cff290d76cf0876dcf7d07240dae0d12d.tar.xz yuzu-e366f60cff290d76cf0876dcf7d07240dae0d12d.tar.zst yuzu-e366f60cff290d76cf0876dcf7d07240dae0d12d.zip |
Diffstat (limited to 'src/core/hle/service')
-rw-r--r-- | src/core/hle/service/hid/hid.cpp | 18 |
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() { PadState changed = { { (state.hex ^ old_state.hex) } }; // Get the current Pad entry - PadDataEntry* pad_entry = &mem->pad.entries[mem->pad.index]; + PadDataEntry& pad_entry = mem->pad.entries[mem->pad.index]; // Update entry properties - pad_entry->current_state.hex = state.hex; - pad_entry->delta_additions.hex = changed.hex & state.hex; - pad_entry->delta_removals.hex = changed.hex & old_state.hex;; + pad_entry.current_state.hex = state.hex; + pad_entry.delta_additions.hex = changed.hex & state.hex; + pad_entry.delta_removals.hex = changed.hex & old_state.hex;; // Set circle Pad - pad_entry->circle_pad_x = state.circle_left ? -MAX_CIRCLEPAD_POS : + pad_entry.circle_pad_x = state.circle_left ? -MAX_CIRCLEPAD_POS : state.circle_right ? MAX_CIRCLEPAD_POS : 0x0; - pad_entry->circle_pad_y = state.circle_down ? -MAX_CIRCLEPAD_POS : + pad_entry.circle_pad_y = state.circle_down ? -MAX_CIRCLEPAD_POS : state.circle_up ? MAX_CIRCLEPAD_POS : 0x0; // If we just updated index 0, provide a new timestamp @@ -106,11 +106,11 @@ void Update() { next_touch_index = (next_touch_index + 1) % mem->touch.entries.size(); // Get the current touch entry - TouchDataEntry* touch_entry = &mem->touch.entries[mem->touch.index]; + TouchDataEntry& touch_entry = mem->touch.entries[mem->touch.index]; bool pressed = false; - std::tie(touch_entry->x, touch_entry->y, pressed) = VideoCore::g_emu_window->GetTouchState(); - touch_entry->valid.Assign(pressed ? 1 : 0); + std::tie(touch_entry.x, touch_entry.y, pressed) = VideoCore::g_emu_window->GetTouchState(); + touch_entry.valid.Assign(pressed ? 1 : 0); // TODO(bunnei): We're not doing anything with offset 0xA8 + 0x18 of HID SharedMemory, which // supposedly is "Touch-screen entry, which contains the raw coordinate data prior to being |