Implement the standalone USB protocol probe and Bluetooth-backed right Joy-Con bridge with its own persistent virtual pairing identity. Preserve complete ordered native reports, including opaque motion data, and match the console feature set. Relay built-in vibration cues only after genuine source acknowledgement and expose safe BOOTSEL pairing control. Include native capture diagnostics and focused protocol, packet-lifecycle, and cue regressions. Native mouse operation confirmed on Switch with bridge 0.24; private captures and firmware backups remain outside the commit.
17 lines
505 B
C
17 lines
505 B
C
#include "button_test.h"
|
|
|
|
bool probe_button_update(probe_button_state* state, int sample, bool ready) {
|
|
if (!ready || (sample != 0 && sample != 1)) {
|
|
state->armed = false;
|
|
state->pressed_samples = 0;
|
|
return false;
|
|
}
|
|
if (sample == 0) {
|
|
state->armed = true;
|
|
state->pressed_samples = 0;
|
|
return false;
|
|
}
|
|
if (!state->armed) return false;
|
|
if (state->pressed_samples < 2) ++state->pressed_samples;
|
|
return state->pressed_samples == 2;
|
|
}
|