mirror of
https://github.com/wheremyfoodat/Panda3DS.git
synced 2025-04-07 14:45:41 +12:00
[HID] Add touchscreen
This commit is contained in:
parent
5200c10b27
commit
4f619086e9
1 changed files with 5 additions and 0 deletions
|
@ -149,7 +149,12 @@ void HIDService::updateInputs(u64 currentTick) {
|
|||
writeSharedMem<u64>(0xA8, currentTick); // Write new tick count
|
||||
}
|
||||
writeSharedMem<u32>(0xB8, nextTouchscreenIndex); // Index last updated by the HID module
|
||||
const size_t touchEntryOffset = 0xC8 + (nextTouchscreenIndex * 8); // Offset in the array of 8 touchscreen entries
|
||||
nextTouchscreenIndex = (nextTouchscreenIndex + 1) % 8; // Move to next entry
|
||||
|
||||
writeSharedMem<u16>(touchEntryOffset, touchScreenX);
|
||||
writeSharedMem<u16>(touchEntryOffset + 2, touchScreenY);
|
||||
writeSharedMem<u8>(touchEntryOffset + 4, touchScreenPressed ? 1 : 0);
|
||||
|
||||
// Next, update accelerometer state
|
||||
if (nextAccelerometerIndex == 0) {
|
||||
|
|
Loading…
Add table
Reference in a new issue