mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 14:19:46 -06:00
HW: Poll system input from system timers
Rather than playing terrible hacks to determine the start of input frames, just update system input periodically. Specifically, every 60th of a second.
This commit is contained in:
@ -17,7 +17,6 @@ namespace Wiimote
|
||||
{
|
||||
|
||||
static InputConfig s_config(WIIMOTE_INI_NAME, _trans("Wiimote"), "Wiimote");
|
||||
static int s_last_number = 4;
|
||||
|
||||
InputConfig* GetConfig()
|
||||
{
|
||||
@ -115,12 +114,6 @@ void Update(int _number)
|
||||
// TODO: change this to a try_to_lock, and make it give empty input on failure
|
||||
std::lock_guard<std::recursive_mutex> lk(s_config.controls_lock);
|
||||
|
||||
if (_number <= s_last_number)
|
||||
{
|
||||
g_controller_interface.UpdateInput();
|
||||
}
|
||||
s_last_number = _number;
|
||||
|
||||
if (WIIMOTE_SRC_EMU & g_wiimote_sources[_number])
|
||||
((WiimoteEmu::Wiimote*)s_config.controllers[_number])->Update();
|
||||
else
|
||||
@ -153,7 +146,6 @@ void DoState(u8 **ptr, PointerWrap::Mode mode)
|
||||
// TODO:
|
||||
|
||||
PointerWrap p(ptr, mode);
|
||||
p.Do(s_last_number);
|
||||
for (unsigned int i=0; i<MAX_BBMOTES; ++i)
|
||||
((WiimoteEmu::Wiimote*)s_config.controllers[i])->DoState(p);
|
||||
}
|
||||
|
Reference in New Issue
Block a user