diff options
| author | Jordan Woyak <jordan.woyak@gmail.com> | 2025-03-02 03:25:23 -0600 |
|---|---|---|
| committer | Jordan Woyak <jordan.woyak@gmail.com> | 2025-03-10 16:40:46 -0500 |
| commit | aa624d8ba8f66e03572fbc1beac6cf67105fb5da (patch) | |
| tree | 85b1286232c2bd185f7d2e222fb3128e137c4b00 /Source | |
| parent | 9675c90890291c245af9bfba61b2d45a7444d7c9 (diff) | |
BTEmu: Throttle prior to wii remote input update.
Diffstat (limited to 'Source')
| -rw-r--r-- | Source/Core/Core/IOS/USB/Bluetooth/BTEmu.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Source/Core/Core/IOS/USB/Bluetooth/BTEmu.cpp b/Source/Core/Core/IOS/USB/Bluetooth/BTEmu.cpp index a63ca59ba9..8e89cc927f 100644 --- a/Source/Core/Core/IOS/USB/Bluetooth/BTEmu.cpp +++ b/Source/Core/Core/IOS/USB/Bluetooth/BTEmu.cpp @@ -347,10 +347,13 @@ void BluetoothEmuDevice::Update() wiimote->Update(); const u64 interval = GetSystem().GetSystemTimers().GetTicksPerSecond() / Wiimote::UPDATE_FREQ; - const u64 now = GetSystem().GetCoreTiming().GetTicks(); + auto& core_timing = GetSystem().GetCoreTiming(); + const u64 now = core_timing.GetTicks(); if (now - m_last_ticks > interval) { + // Throttle before Wii Remote update so input is taken just before needed. (lower input latency) + core_timing.Throttle(now); g_controller_interface.SetCurrentInputChannel(ciface::InputChannel::Bluetooth); g_controller_interface.UpdateInput(); |
