Move controller-poll info from Injection to Controllers panel
The per-slot XInput poll rates and the "game reading controller" summary describe the controller, not the injection mechanism, so move them to the Controllers panel (renamed from debug_overlay -> ControllersPanel, now a class that owns the poll-rate sampling). The panel now shows both directions: the guest pads the host receives from RPT, and what the injected game reads back. The Injection panel keeps the hook attach state, focus spoof, focus-API counts, and input-path diagnostics, and points to the Controllers panel for poll rates. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
31
host/src/controllers_panel.hpp
Normal file
31
host/src/controllers_panel.hpp
Normal file
@@ -0,0 +1,31 @@
|
||||
// Controllers panel: the controller view of the pipeline. Shows what the host
|
||||
// receives from Remote Play Together (the guest pads, via the input backend) and
|
||||
// what the injected game actually reads back (per-slot XInput poll counts from the
|
||||
// hook). This is how we verify RPT routes a guest's gamepad in and the game polls
|
||||
// it out. The per-axis breakdown and per-slot poll table are debug-only.
|
||||
#pragma once
|
||||
|
||||
#include <cstdint>
|
||||
|
||||
#include "coop/protocol.hpp"
|
||||
#include "input/input_source.hpp"
|
||||
#include "ipc/ipc_server.hpp"
|
||||
|
||||
namespace coop
|
||||
{
|
||||
|
||||
class ControllersPanel
|
||||
{
|
||||
public:
|
||||
// `status` is the hook's back-channel (per-slot poll counters); `debug_details`
|
||||
// reveals the raw axis values and the per-slot poll-rate table.
|
||||
void draw(const InputSource& input, const HookStatusView& status, bool debug_details);
|
||||
|
||||
private:
|
||||
// Sampled to turn the hook's cumulative per-slot counters into poll rates.
|
||||
unsigned long long last_state_count_[kMaxPads] = {};
|
||||
double state_rate_[kMaxPads] = {};
|
||||
double last_sample_time_ = 0.0;
|
||||
};
|
||||
|
||||
} // namespace coop
|
||||
Reference in New Issue
Block a user