Move the synthetic-input toggle to Controllers under Debug details
"Forward synthetic test input" is a controller-debug aid, so it now lives in the Controllers panel (gated behind Debug details, disabled until the XInput hook is attached) instead of the Injection panel. ControllersPanel owns the flag and exposes test_input(); main feeds it into InjectionPanel::set_test_input each frame, so the existing synthetic-pad substitution in publish() is unchanged. Verified: x64 build green; review (default view no longer shows it in Injection; appears in Controllers under Debug details). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -18,9 +18,17 @@ 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.
|
||||
// reveals the raw axis values, the per-slot poll-rate table, and the synthetic
|
||||
// test-input toggle.
|
||||
void draw(const InputSource& input, const HookStatusView& status, bool debug_details);
|
||||
|
||||
// Whether the operator enabled "Forward synthetic test input" (a controller debug
|
||||
// aid). The host feeds this to InjectionPanel, which substitutes a synthetic pad.
|
||||
[[nodiscard]] bool test_input() const
|
||||
{
|
||||
return test_input_;
|
||||
}
|
||||
|
||||
#ifdef COOP_WITH_STEAM
|
||||
// Whether the operator has opted into Steam Input. It's off by default: simply
|
||||
// initializing Steam Input activates Steam's in-process XInput interception,
|
||||
@@ -44,6 +52,8 @@ public:
|
||||
#endif
|
||||
|
||||
private:
|
||||
bool test_input_ = false; // "Forward synthetic test input" (debug aid, default off)
|
||||
|
||||
// Sampled to turn the hook's cumulative per-slot counters into poll rates.
|
||||
unsigned long long last_state_count_[kMaxPads] = {};
|
||||
double state_rate_[kMaxPads] = {};
|
||||
|
||||
Reference in New Issue
Block a user