From eec7f65e3342ff82646a7987c9b59e17b45f1cf7 Mon Sep 17 00:00:00 2001 From: Jordan Woyak Date: Sat, 4 Oct 2025 14:50:58 -0500 Subject: [PATCH] WiimoteReal/IOLinux: Increase inquiry length to 3.84 seconds. This is what Wii games use and it seems to work better. --- Source/Core/Core/HW/WiimoteReal/IOLinux.cpp | 4 +--- Source/Core/Core/HW/WiimoteReal/WiimoteReal.h | 3 +++ 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Source/Core/Core/HW/WiimoteReal/IOLinux.cpp b/Source/Core/Core/HW/WiimoteReal/IOLinux.cpp index 70627b31fd..9361515d92 100644 --- a/Source/Core/Core/HW/WiimoteReal/IOLinux.cpp +++ b/Source/Core/Core/HW/WiimoteReal/IOLinux.cpp @@ -55,9 +55,7 @@ void WiimoteScannerLinux::FindWiimotes(std::vector& 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; diff --git a/Source/Core/Core/HW/WiimoteReal/WiimoteReal.h b/Source/Core/Core/HW/WiimoteReal/WiimoteReal.h index 103ea073f2..ee43588f51 100644 --- a/Source/Core/Core/HW/WiimoteReal/WiimoteReal.h +++ b/Source/Core/Core/HW/WiimoteReal/WiimoteReal.h @@ -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.