mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-04-20 03:24:59 +00:00
BTEmu: Throttle prior to wii remote input update.
This commit is contained in:
parent
9675c90890
commit
aa624d8ba8
1 changed files with 4 additions and 1 deletions
|
@ -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();
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue