summaryrefslogtreecommitdiff
path: root/Source/Core/InputCommon/Src/ControllerInterface/DirectInput/DirectInputKeyboardMouse.cpp
diff options
context:
space:
mode:
authorJordan Woyak <jordan.woyak@gmail.com>2010-06-12 02:08:01 +0000
committerJordan Woyak <jordan.woyak@gmail.com>2010-06-12 02:08:01 +0000
commitff5081942ad26557a5c6eddfb44d19fd99964ad5 (patch)
treeb02cdc5d80feaca47287d44b0263b7c739793fb3 /Source/Core/InputCommon/Src/ControllerInterface/DirectInput/DirectInputKeyboardMouse.cpp
parentd937b73d9c3bc6919ebdcbf40065fbb5309d2dd9 (diff)
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
Diffstat (limited to 'Source/Core/InputCommon/Src/ControllerInterface/DirectInput/DirectInputKeyboardMouse.cpp')
-rw-r--r--Source/Core/InputCommon/Src/ControllerInterface/DirectInput/DirectInputKeyboardMouse.cpp14
1 files changed, 7 insertions, 7 deletions
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::vector<ControllerInterfa
LPDIRECTINPUTDEVICE8 kb_device = NULL;
LPDIRECTINPUTDEVICE8 mo_device = NULL;
- if (DI_OK == idi8->CreateDevice( 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 )