mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 06:09:50 -06:00
Improvements to new emulated wiimote plugin: IR cursor works with mouse or analog stick control. Wiimote mii data is saved/loaded to "User/Wii/mii.bin". Background input checkbox works properly. All reporting modes except the interleaved one should work. Fixed a rumble prob with multiple XInput devices.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5396 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@ -64,6 +64,7 @@ Device::Device( const XINPUT_CAPABILITIES* const caps, const unsigned int index
|
||||
: m_index(index), m_subtype(caps->SubType)
|
||||
{
|
||||
ZeroMemory( &m_state_out, sizeof(m_state_out) );
|
||||
ZeroMemory( &m_current_state_out, sizeof(m_current_state_out) );
|
||||
|
||||
// XInputGetCaps seems to always claim all capabilities are supported
|
||||
// but i will leave all this stuff in, incase m$ fixes xinput up a bit
|
||||
@ -149,10 +150,10 @@ bool Device::UpdateInput()
|
||||
bool Device::UpdateOutput()
|
||||
{
|
||||
// this if statement is to make rumble work better when multiple ControllerInterfaces are using the device
|
||||
static XINPUT_VIBRATION current_state_out = {0,0};
|
||||
if ( memcmp( &m_state_out, ¤t_state_out, sizeof(m_state_out) ) )
|
||||
// only calls XInputSetState if the state changed
|
||||
if ( memcmp( &m_state_out, &m_current_state_out, sizeof(m_state_out) ) )
|
||||
{
|
||||
current_state_out = m_state_out;
|
||||
m_current_state_out = m_state_out;
|
||||
return ( ERROR_SUCCESS == XInputSetState( m_index, &m_state_out ) );
|
||||
}
|
||||
else
|
||||
|
@ -105,6 +105,7 @@ private:
|
||||
const unsigned int m_index;
|
||||
XINPUT_STATE m_state_in;
|
||||
XINPUT_VIBRATION m_state_out;
|
||||
XINPUT_VIBRATION m_current_state_out;
|
||||
const unsigned int m_subtype;
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user