hi XINPUT issue when using multiple hi (in windows)

Nicholas Hobson's icon

I'm working on a patch that is intended to use multiple hi (human interfaces).

I set up an abstraction using a single hi object configured to use an XINPUT device. When I added a second copy of the abstraction, the hi object started behaving differently.

Expected Behaviour:
If only one hi object is present (e.g. XINPUT_0), the XINPUT outputs a 1 when I press a button (e.g. "14 1") and a 0 when I release it (e.g. "14 0").

Unexpected Behaviour:
When two hi objects are present (set to different XINPUTs, e.g. XINPUT_0 & XINPUT_1) and a button is pressed, the hi object begins to output 1 (e.g. "14 1") at the polling rate, until the button is released at which point it simply stops outputting (instead of outputting "14 0").

Is this a bug?

If not, can anyone explain why the behaviour is different when using 1 vs. multiple hi objects?

I'm on a windows device running Win 10 and using Max 8.5.6 (x64 windows).

The XINPUT devices in question are two Xbox One controllers.

If you happen to have two xbox one controllers, this patch demonstrates the issue, if you choose two different XINPUT devices. I'm not sure if the problem extends to other xinput devices, but presumably it does.

Max Patch
Copy patch and select New From Clipboard in Max.