diff --git a/src/core/services/hid.cpp b/src/core/services/hid.cpp index 8b5e57bf..fa4536d0 100644 --- a/src/core/services/hid.cpp +++ b/src/core/services/hid.cpp @@ -149,7 +149,12 @@ void HIDService::updateInputs(u64 currentTick) { writeSharedMem(0xA8, currentTick); // Write new tick count } writeSharedMem(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(touchEntryOffset, touchScreenX); + writeSharedMem(touchEntryOffset + 2, touchScreenY); + writeSharedMem(touchEntryOffset + 4, touchScreenPressed ? 1 : 0); // Next, update accelerometer state if (nextAccelerometerIndex == 0) {