Files
AnyPS5/docs/dev/debt/libSceBluetoothHid.md
T
Dean 50ab75da5e Merge pull request #15319 from Elma7e/feat/bluetoothhid-uninitialized-guards
feat(libSceBluetoothHid): return not-initialized error before initialization in device query and report exports
2026-11-07 16:01:44 +13:00

3.4 KiB

libSceBluetoothHid technical debt

Silent stubs

Unknown function info

  • sceBluetoothHidGetDeviceName and sceBluetoothHidGetDeviceInfo: throw through NotImplemented_nid_no_patch; the native module forwards their output pointers to device ioctls without accessing the buffers, and their output sizes and layouts remain unresolved. Report APIs use 64-bit device handles; device-info and disconnect APIs use 32-bit device IDs.
  • sceBluetoothHidParamInitialize follows firmware 13.42's module as BunnyFl ran it natively (comment; not a console, and neither the kernel side of /dev/bt nor the event thread's work is covered): it writes its second argument at offset 0 of the 16-byte block, clears the 32-bit word at offset 8, leaves bytes 12 to 15 and returns 0, and a null block returns 0x81540001. SharpProspero types that argument as a 64-bit value; it is the address of a BluetoothHidThreadParam, since sceBluetoothHidRegisterCallback reads the event thread's priority and affinity through it.
  • sceBluetoothHidThreadParamInitialize: the success value, range checks of the priority or affinity mask, bytes 20 to 23 and calls before sceBluetoothHidInit are not covered by the run it follows (BunnyFl's native x86-64 run of firmware 13.42's module, not a console; comment). The run covers (700, 0x3f), stored as the 32-bit priority at offset 0 and the 64-bit mask at 8 with a 32-bit 0 at 16 and bytes 4 to 7 kept, and a null block, refused with 0x81540001. Here any values are stored unchecked, bytes 20 to 23 are kept, sceBluetoothHidInit is not needed, and 0 is returned, as sceBluetoothHidParamInitialize returns in that run and SharpProspero gives for every call on success.
  • sceBluetoothHidDebugGetVersion: returns a constant without reading arguments, so the supplied implementation does not establish whether the public prototype has unused parameters.