From ff5081942ad26557a5c6eddfb44d19fd99964ad5 Mon Sep 17 00:00:00 2001 From: Jordan Woyak Date: Sat, 12 Jun 2010 02:08:01 +0000 Subject: New GCPad/Wiimote: Hopefully fixed lock up issues with DirectInput devices. Wiimote tilt should work with keyboard keys/gamepad buttons now as well as IR Forward/Backward(which was added). Made input detection buttons display "[ waiting ]" while waiting for input. minor fixes/cleanups. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5651 8ced0084-cf51-0410-be5f-012b33b47a6e --- .../DirectInput/DirectInputKeyboardMouse.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'Source/Core/InputCommon/Src/ControllerInterface/DirectInput/DirectInputKeyboardMouse.cpp') diff --git a/Source/Core/InputCommon/Src/ControllerInterface/DirectInput/DirectInputKeyboardMouse.cpp b/Source/Core/InputCommon/Src/ControllerInterface/DirectInput/DirectInputKeyboardMouse.cpp index adc5dadc42..76ac358d7c 100644 --- a/Source/Core/InputCommon/Src/ControllerInterface/DirectInput/DirectInputKeyboardMouse.cpp +++ b/Source/Core/InputCommon/Src/ControllerInterface/DirectInput/DirectInputKeyboardMouse.cpp @@ -49,15 +49,15 @@ void InitKeyboardMouse( IDirectInput8* const idi8, std::vectorCreateDevice( GUID_SysKeyboard, &kb_device, NULL)) + if (SUCCEEDED(idi8->CreateDevice( GUID_SysKeyboard, &kb_device, NULL))) { - if (DI_OK == kb_device->SetDataFormat(&c_dfDIKeyboard)) - if (DI_OK == kb_device->SetCooperativeLevel(NULL, DISCL_BACKGROUND | DISCL_NONEXCLUSIVE)) + if (SUCCEEDED(kb_device->SetDataFormat(&c_dfDIKeyboard))) + if (SUCCEEDED(kb_device->SetCooperativeLevel(NULL, DISCL_BACKGROUND | DISCL_NONEXCLUSIVE))) { - if (DI_OK == idi8->CreateDevice( GUID_SysMouse, &mo_device, NULL )) + if (SUCCEEDED(idi8->CreateDevice( GUID_SysMouse, &mo_device, NULL ))) { - if (DI_OK == mo_device->SetDataFormat(&c_dfDIMouse2)) - if (DI_OK == mo_device->SetCooperativeLevel(NULL, DISCL_BACKGROUND | DISCL_NONEXCLUSIVE)) + if (SUCCEEDED(mo_device->SetDataFormat(&c_dfDIMouse2))) + if (SUCCEEDED(mo_device->SetCooperativeLevel(NULL, DISCL_BACKGROUND | DISCL_NONEXCLUSIVE))) { devices.push_back(new KeyboardMouse(kb_device, mo_device)); return; @@ -147,7 +147,7 @@ bool KeyboardMouse::UpdateInput() if (DIERR_INPUTLOST == mo_hr || DIERR_NOTACQUIRED == mo_hr) m_mo_device->Acquire(); - if (DI_OK == kb_hr && DI_OK == mo_hr) + if (SUCCEEDED(kb_hr) && SUCCEEDED(mo_hr)) { // need to smooth out the axes, otherwise it doesnt work for shit for ( unsigned int i = 0; i < 3; ++i ) -- cgit v1.2.3