summaryrefslogtreecommitdiff
path: root/Source/Plugins/Plugin_GCPadNew/Src/ControllerInterface/DirectInput/DirectInputJoystick.cpp
diff options
context:
space:
mode:
authorJordan Woyak <jordan.woyak@gmail.com>2010-04-08 03:33:16 +0000
committerJordan Woyak <jordan.woyak@gmail.com>2010-04-08 03:33:16 +0000
commitb0e8a67cf2da02e4568986cbb06fbca9f14705fb (patch)
tree52519fd4f6c74b9cabf531e5942fdfd7c70f7a9c /Source/Plugins/Plugin_GCPadNew/Src/ControllerInterface/DirectInput/DirectInputJoystick.cpp
parenteada74b74e9d602802fa629fbcd2133f17803d50 (diff)
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
Diffstat (limited to 'Source/Plugins/Plugin_GCPadNew/Src/ControllerInterface/DirectInput/DirectInputJoystick.cpp')
-rw-r--r--Source/Plugins/Plugin_GCPadNew/Src/ControllerInterface/DirectInput/DirectInputJoystick.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/Source/Plugins/Plugin_GCPadNew/Src/ControllerInterface/DirectInput/DirectInputJoystick.cpp b/Source/Plugins/Plugin_GCPadNew/Src/ControllerInterface/DirectInput/DirectInputJoystick.cpp
index 3e129132ba..5fd209b7c2 100644
--- a/Source/Plugins/Plugin_GCPadNew/Src/ControllerInterface/DirectInput/DirectInputJoystick.cpp
+++ b/Source/Plugins/Plugin_GCPadNew/Src/ControllerInterface/DirectInput/DirectInputJoystick.cpp
@@ -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 );