GCPadNew: Added option to disable input when Dolphin window isn't active. Some other minor fixes/cleanups.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5290 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
Jordan Woyak 2010-04-08 03:33:16 +00:00
parent eada74b74e
commit b0e8a67cf2
8 changed files with 130 additions and 56 deletions

View file

@ -217,7 +217,7 @@ Joystick::Joystick( /*const LPCDIDEVICEINSTANCE lpddi, */const LPDIRECTINPUTDEVI
js_caps.dwButtons = std::min((DWORD)32, js_caps.dwButtons);
js_caps.dwPOVs = std::min((DWORD)4, js_caps.dwPOVs);
m_must_poll = (bool)( js_caps.dwFlags & DIDC_POLLEDDATAFORMAT );
m_must_poll = ( ( js_caps.dwFlags & DIDC_POLLEDDATAFORMAT ) > 0 );
// buttons
for ( unsigned int i = 0; i < js_caps.dwButtons; ++i )
@ -387,7 +387,7 @@ bool Joystick::UpdateInput()
HRESULT hr = m_device->GetDeviceState( sizeof(m_state_in), &m_state_in );
// try reacquire if input lost
while ( DIERR_INPUTLOST == hr )
if ( DIERR_INPUTLOST == hr )
hr = m_device->Acquire();
return ( DI_OK == hr );