WiimoteReal/IOLinux: Increase inquiry length to 3.84 seconds. This is what Wii games use and it seems to work better.

This commit is contained in:
Jordan Woyak
2025-10-04 14:50:58 -05:00
parent 72f854d228
commit eec7f65e33
2 changed files with 4 additions and 3 deletions

View File

@@ -55,9 +55,7 @@ void WiimoteScannerLinux::FindWiimotes(std::vector<Wiimote*>& found_wiimotes, Wi
{
WiimoteScannerLinux::AddAutoConnectAddresses(found_wiimotes);
// supposedly 1.28 seconds
int const wait_len = 1;
int const wait_len = BLUETOOTH_INQUIRY_LENGTH;
int const max_infos = 255;
inquiry_info scan_infos[max_infos] = {};
auto* scan_infos_ptr = scan_infos;

View File

@@ -33,6 +33,9 @@ constexpr int REPORT_HID_HEADER_SIZE = 1;
constexpr u32 WIIMOTE_DEFAULT_TIMEOUT = 1000;
// Multiple of 1.28 seconds. Wii games use a value of 3.
constexpr u8 BLUETOOTH_INQUIRY_LENGTH = 3;
// The 4 most significant bits of the first byte of an outgoing command must be
// 0x50 if sending on the command channel and 0xA0 if sending on the interrupt
// channel. On Mac and Linux we use interrupt channel; on Windows, command.