Commit 01314637 authored by Ben Hymers's avatar Ben Hymers
Browse files

Removed all trailing whitespace

parent b408932f
......@@ -411,7 +411,7 @@ void Win32JoyStick::captureXInput()
axisMoved[1] = true;
//RightY
value = -(int)inputState.Gamepad.sThumbRY;
value = -(int)inputState.Gamepad.sThumbRY;
mState.mAxes[2].rel = value - mState.mAxes[2].abs;
mState.mAxes[2].abs = value;
if(mState.mAxes[2].rel != 0)
......@@ -442,11 +442,11 @@ void Win32JoyStick::captureXInput()
mState.mAxes[5].abs = value;
if(mState.mAxes[5].rel != 0)
axisMoved[5] = true;
//POV
int previousPov = mState.mPOV[0].direction;
int previousPov = mState.mPOV[0].direction;
int& pov = mState.mPOV[0].direction;
pov = Pov::Centered;
pov = Pov::Centered;
if (inputState.Gamepad.wButtons & XINPUT_GAMEPAD_DPAD_UP)
pov |= Pov::North;
else if (inputState.Gamepad.wButtons & XINPUT_GAMEPAD_DPAD_DOWN)
......@@ -455,7 +455,7 @@ void Win32JoyStick::captureXInput()
pov |= Pov::West;
else if (inputState.Gamepad.wButtons & XINPUT_GAMEPAD_DPAD_RIGHT)
pov |= Pov::East;
//Buttons - The first 4 buttons don't need to be checked since they represent the dpad
bool previousButtons[XINPUT_TRANSLATED_BUTTON_COUNT];
std::copy(mState.mButtons.begin(), mState.mButtons.end(), previousButtons);
......@@ -601,16 +601,16 @@ void Win32JoyStick::CheckXInputDevices(JoyStickInfoList &joys)
bstrDeviceID = SysAllocString( L"DeviceID" );
if( bstrDeviceID == NULL )
goto LCleanup;
// Connect to WMI
// Connect to WMI
hr = pIWbemLocator->ConnectServer( bstrNamespace, NULL, NULL, 0L, 0L, NULL, NULL, &pIWbemServices );
if( FAILED(hr) || pIWbemServices == NULL )
goto LCleanup;
// Switch security level to IMPERSONATE.
CoSetProxyBlanket(pIWbemServices, RPC_C_AUTHN_WINNT, RPC_C_AUTHZ_NONE, NULL, RPC_C_AUTHN_LEVEL_CALL, RPC_C_IMP_LEVEL_IMPERSONATE, NULL, EOAC_NONE );
// Switch security level to IMPERSONATE.
CoSetProxyBlanket(pIWbemServices, RPC_C_AUTHN_WINNT, RPC_C_AUTHZ_NONE, NULL, RPC_C_AUTHN_LEVEL_CALL, RPC_C_IMP_LEVEL_IMPERSONATE, NULL, EOAC_NONE );
hr = pIWbemServices->CreateInstanceEnum( bstrClassName, 0, NULL, &pEnumDevices );
hr = pIWbemServices->CreateInstanceEnum( bstrClassName, 0, NULL, &pEnumDevices );
if( FAILED(hr) || pEnumDevices == NULL )
goto LCleanup;
......@@ -631,7 +631,7 @@ void Win32JoyStick::CheckXInputDevices(JoyStickInfoList &joys)
hr = pDevices[iDevice]->Get(bstrDeviceID, 0L, &var, NULL, NULL);
if(SUCCEEDED(hr) && var.vt == VT_BSTR && var.bstrVal != NULL)
{
// Check if the device ID contains "IG_". If it does, then it's an XInput device - This information can not be found from DirectInput
// Check if the device ID contains "IG_". If it does, then it's an XInput device - This information can not be found from DirectInput
if(wcsstr(var.bstrVal, L"IG_"))
{
// If it does, then get the VID/PID from var.bstrVal
......
......@@ -6,16 +6,16 @@ Copyright (c) 2005-2007 Phillip Castaneda (pjcast -- www.wreckedgames.com)
This software is provided 'as-is', without any express or implied warranty. In no event will
the authors be held liable for any damages arising from the use of this software.
Permission is granted to anyone to use this software for any purpose, including commercial
Permission is granted to anyone to use this software for any purpose, including commercial
applications, and to alter it and redistribute it freely, subject to the following
restrictions:
1. The origin of this software must not be misrepresented; you must not claim that
you wrote the original software. If you use this software in a product,
an acknowledgment in the product documentation would be appreciated but is
1. The origin of this software must not be misrepresented; you must not claim that
you wrote the original software. If you use this software in a product,
an acknowledgment in the product documentation would be appreciated but is
not required.
2. Altered source versions must be plainly marked as such, and must not be
2. Altered source versions must be plainly marked as such, and must not be
misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.
......@@ -130,10 +130,10 @@ void Win32Keyboard::_readBuffered()
//send no more events and just leave as the this pointer is invalid now...
bool ret = true;
KeyCode kc = (KeyCode)diBuff[ i ].dwOfs;
//Store result in our keyBuffer too
KeyBuffer[kc] = static_cast<unsigned char>(diBuff[ i ].dwData);
if( diBuff[ i ].dwData & 0x80 )
{
//Turn on modifier
......@@ -170,7 +170,7 @@ void Win32Keyboard::_readBuffered()
if(verifyAfterAltTab)
{
bool ret = true;
//Copy old buffer to temp location to compare against
unsigned char keyBufferCopy[256];
memcpy(keyBufferCopy, KeyBuffer, 256);
......@@ -246,7 +246,7 @@ int Win32Keyboard::_translateText( KeyCode kc )
// Combine the two into a single character
WCHAR wcBuff[3] = {buff[0], deadKey, '\0'};
WCHAR out[3];
deadKey = '\0';
if(FoldStringW(MAP_PRECOMPOSED, (LPWSTR)wcBuff, 3, (LPWSTR)out, 3))
return out[0];
......@@ -326,7 +326,7 @@ void Win32Keyboard::setBuffered(bool buffered)
mKeyboard->Release();
mKeyboard = 0;
}
mBuffered = buffered;
_initialize();
}
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -26,7 +26,7 @@ private:
//bool FindWiimote();
void GetCapabilities();
void PrepareForOverlappedTransfer();
HANDLE mHandle;
HANDLE mEvent;
HANDLE WriteHandle;
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment