From b0e8a67cf2da02e4568986cbb06fbca9f14705fb Mon Sep 17 00:00:00 2001 From: Jordan Woyak Date: Thu, 8 Apr 2010 03:33:16 +0000 Subject: 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 --- .../ControllerInterface/DirectInput/DirectInputKeyboardMouse.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'Source/Plugins/Plugin_GCPadNew/Src/ControllerInterface/DirectInput/DirectInputKeyboardMouse.cpp') diff --git a/Source/Plugins/Plugin_GCPadNew/Src/ControllerInterface/DirectInput/DirectInputKeyboardMouse.cpp b/Source/Plugins/Plugin_GCPadNew/Src/ControllerInterface/DirectInput/DirectInputKeyboardMouse.cpp index 9767f3c94e..6f79af95e3 100644 --- a/Source/Plugins/Plugin_GCPadNew/Src/ControllerInterface/DirectInput/DirectInputKeyboardMouse.cpp +++ b/Source/Plugins/Plugin_GCPadNew/Src/ControllerInterface/DirectInput/DirectInputKeyboardMouse.cpp @@ -189,8 +189,11 @@ bool KeyboardMouse::UpdateOutput() m_current_state_out[i] ^= 1; } } - - return ( kbinputs.size() == SendInput( (UINT)kbinputs.size(), &kbinputs[0], sizeof( kbinputs[0] ) ) ); + + if ( kbinputs.size() ) + return ( kbinputs.size() == SendInput( (UINT)kbinputs.size(), &kbinputs[0], sizeof( kbinputs[0] ) ) ); + else + return true; } std::string KeyboardMouse::GetName() const -- cgit v1.2.3