Refactor main loop touch flow and update docs

This commit is contained in:
Adolfo Reyna
2026-02-18 12:08:23 -05:00
parent be6a217b08
commit a06e0d69fe
4 changed files with 41 additions and 31 deletions

View File

@@ -37,9 +37,9 @@ public:
InputManager(LowLevelTouch* touch, const GameConfig* config);
/**
* @brief Process touch input from controller
* @param last_time Pointer to last touch timestamp for debouncing
* @return InputEvent (valid=false if no valid input)
* @brief Process touch input using hybrid IRQ + active-session sampling.
* @param last_time Pointer to last touch timestamp (0 means no active touch session)
* @return InputEvent (valid=false if no state change/update is emitted)
*/
InputEvent process_touch_input(uint32_t* last_time);
@@ -97,6 +97,8 @@ public:
private:
LowLevelTouch* touch;
const GameConfig* config;
// Consecutive touch_count==0 samples while a touch session is active.
// Used to suppress false TOUCH_UP events from transient touch controller jitter.
uint8_t no_touch_samples = 0;
// Virtual button regions