sceBluetoothHidThreadParamInitialize threw NotImplemented. It now fills
the thread parameter block that sceBluetoothHidRegisterCallback reads:
the 32-bit priority at offset 0, the 64-bit affinity mask at offset 8
and 0 in the 32 bits at offset 16, leaving bytes 4 to 7 and 20 to 23
as they were, and returns 0. A null block returns 0x81540001.
This follows BunnyFl's native x86-64 run of firmware 13.42's
libSceBluetoothHid, not a console:
https://github.com/boykopovar/AnyPS5/pull/11124#issuecomment-6416053242
The test checks the run's bytes for (700, 0x3f) and the null answer.
The run does not show the success value, range checks, bytes 20 to 23
or calls before sceBluetoothHidInit; the debt entry records them.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Cover non-null callback registration before init, post-unregister noCallback state on duplicate unregister and device registration, and null parameter initialization.
BunnyFl ran firmware 13.42's libSceBluetoothHid natively. A null block
given to sceBluetoothHidParamInitialize returns 0x81540001, so it now
returns InvalidArgument instead of throwing, and the test checks that
answer. The run also shows sceBluetoothHidRegisterCallback reading the
event thread's priority and affinity through the stored value, which
makes it the BluetoothHidThreadParam pointer the signature declares;
the debt entry cites the run and its limits.
The implementation checks initialization only and ignores the vendor and product IDs, so unregistering before RegisterCallback returns 0; NoCallback is a RegisterDevice and callback-path result.