From 8a9fcd3014a4aee23b6fb7008a02679f8bf96200 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Sun, 14 Apr 2013 22:53:10 -0400 Subject: Kill off dangling else's in the InputCommon project. Some indentations were also too far for some things. Fixed this. Also update the license header to show Git instead of SVN. Got rid of some trailing spaces/tabs too. --- .../DInput/DInputKeyboardMouse.cpp | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) (limited to 'Source/Core/InputCommon/Src/ControllerInterface/DInput/DInputKeyboardMouse.cpp') diff --git a/Source/Core/InputCommon/Src/ControllerInterface/DInput/DInputKeyboardMouse.cpp b/Source/Core/InputCommon/Src/ControllerInterface/DInput/DInputKeyboardMouse.cpp index aea12c065c..866bce9671 100644 --- a/Source/Core/InputCommon/Src/ControllerInterface/DInput/DInputKeyboardMouse.cpp +++ b/Source/Core/InputCommon/Src/ControllerInterface/DInput/DInputKeyboardMouse.cpp @@ -56,15 +56,19 @@ void InitKeyboardMouse(IDirectInput8* const idi8, std::vectorCreateDevice( GUID_SysKeyboard, &kb_device, NULL))) { if (SUCCEEDED(kb_device->SetDataFormat(&c_dfDIKeyboard))) - if (SUCCEEDED(kb_device->SetCooperativeLevel(NULL, DISCL_BACKGROUND | DISCL_NONEXCLUSIVE))) { - if (SUCCEEDED(idi8->CreateDevice( GUID_SysMouse, &mo_device, NULL ))) + if (SUCCEEDED(kb_device->SetCooperativeLevel(NULL, DISCL_BACKGROUND | DISCL_NONEXCLUSIVE))) { - if (SUCCEEDED(mo_device->SetDataFormat(&c_dfDIMouse2))) - if (SUCCEEDED(mo_device->SetCooperativeLevel(NULL, DISCL_BACKGROUND | DISCL_NONEXCLUSIVE))) + if (SUCCEEDED(idi8->CreateDevice( GUID_SysMouse, &mo_device, NULL ))) { - devices.push_back(new KeyboardMouse(kb_device, mo_device)); - return; + 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; + } + } } } } @@ -203,7 +207,9 @@ bool KeyboardMouse::UpdateOutput() memset( this, 0, sizeof(*this) ); type = INPUT_KEYBOARD; ki.wVk = key; - if (up) ki.dwFlags = KEYEVENTF_KEYUP; + + if (up) + ki.dwFlags = KEYEVENTF_KEYUP; } }; -- cgit v1.2.3 From d244bca1f5f210e03839d0e0a485fc5511ede2d6 Mon Sep 17 00:00:00 2001 From: lioncash Date: Fri, 19 Apr 2013 09:21:45 -0400 Subject: Fix a bunch of random typos in comments and logging. Also update the comment headers for two functions in GCMemcard.cpp. --- .../Src/ControllerInterface/DInput/DInputKeyboardMouse.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'Source/Core/InputCommon/Src/ControllerInterface/DInput/DInputKeyboardMouse.cpp') diff --git a/Source/Core/InputCommon/Src/ControllerInterface/DInput/DInputKeyboardMouse.cpp b/Source/Core/InputCommon/Src/ControllerInterface/DInput/DInputKeyboardMouse.cpp index 866bce9671..ea6452376d 100644 --- a/Source/Core/InputCommon/Src/ControllerInterface/DInput/DInputKeyboardMouse.cpp +++ b/Source/Core/InputCommon/Src/ControllerInterface/DInput/DInputKeyboardMouse.cpp @@ -6,7 +6,7 @@ #include "DInput.h" // (lower would be more sensitive) user can lower sensitivity by setting range - // seems decent here ( at 8 ), I dont think anyone would need more sensitive than this + // seems decent here ( at 8 ), I don't think anyone would need more sensitive than this // and user can lower it much farther than they would want to with the range #define MOUSE_AXIS_SENSITIVITY 8 @@ -47,7 +47,7 @@ void InitKeyboardMouse(IDirectInput8* const idi8, std::vector