misc: various performance clean up (#844)

## Link to GitHub Issue or related Pull Request, if one exists
n/a

## Description of change

- Replace unnecessary precision timers with standard sleeps to reduce
wakeups and background CPU usage.
- Reuse buffers in raw input, touchscreen, and HID output paths to
eliminate steady-state allocations.
- Pre-index HID button groups and correctly process batched HID reports.

No functional changes.

## Testing
This commit is contained in:
bicarus
2026-07-28 21:05:32 -07:00
committed by GitHub
parent 7ccd938f9b
commit 5cabd026ae
10 changed files with 139 additions and 106 deletions
+2 -4
View File
@@ -1,5 +1,6 @@
#include "poke.h"
#include <chrono>
#include <thread>
#include "windows.h"
@@ -11,7 +12,6 @@
#include "touch/native/inject.h"
#include "touch/touch.h"
#include "util/logging.h"
#include "util/precise_timer.h"
namespace games::iidx::poke {
@@ -125,8 +125,6 @@ namespace games::iidx::poke {
// create new thread
THREAD_RUNNING = true;
THREAD = new std::thread([] {
timeutils::PreciseSleepTimer timer;
// log
log_info("poke", "enabled");
@@ -198,7 +196,7 @@ namespace games::iidx::poke {
}
// slow down
timer.sleep(50);
std::this_thread::sleep_for(std::chrono::milliseconds(50));
}
if (!touch_points.empty()) {