mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-06-11 16:49:28 +02:00
Gecko codes: Added parenthesis where they were needed.(thanks to glennrics and soren) Fixed a copy paste error with write & fill 8bit codes. Also forgot to remove a return false;.(some more codes should work (fixed issue 2968)) New Wiimote Plugin: Added emulated swinging.(seems to work) Changed the emulated calibration data to some nice values. ControllerInterface: moved and constified some stuff.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5980 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@ -121,8 +121,13 @@ void ControllerInterface::SetHwnd( void* const hwnd )
|
||||
//
|
||||
// update input for all devices, return true if all devices returned successful
|
||||
//
|
||||
bool ControllerInterface::UpdateInput()
|
||||
bool ControllerInterface::UpdateInput(const bool force)
|
||||
{
|
||||
if (force)
|
||||
update_lock.Enter();
|
||||
else if (false == update_lock.TryEnter())
|
||||
return false;
|
||||
|
||||
size_t ok_count = 0;
|
||||
|
||||
std::vector<Device*>::const_iterator
|
||||
@ -137,6 +142,7 @@ bool ControllerInterface::UpdateInput()
|
||||
//(*d)->ClearInputState();
|
||||
}
|
||||
|
||||
update_lock.Leave();
|
||||
return (m_devices.size() == ok_count);
|
||||
}
|
||||
|
||||
@ -145,8 +151,13 @@ bool ControllerInterface::UpdateInput()
|
||||
//
|
||||
// update output for all devices, return true if all devices returned successful
|
||||
//
|
||||
bool ControllerInterface::UpdateOutput()
|
||||
bool ControllerInterface::UpdateOutput(const bool force)
|
||||
{
|
||||
if (force)
|
||||
update_lock.Enter();
|
||||
else if (false == update_lock.TryEnter())
|
||||
return false;
|
||||
|
||||
size_t ok_count = 0;
|
||||
|
||||
std::vector<Device*>::const_iterator
|
||||
@ -155,6 +166,7 @@ bool ControllerInterface::UpdateOutput()
|
||||
for (;d != e; ++d)
|
||||
(*d)->UpdateOutput();
|
||||
|
||||
update_lock.Leave();
|
||||
return (m_devices.size() == ok_count);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user