diff options
| author | lioncash <mathew1900@hotmail.com> | 2013-04-19 09:21:45 -0400 |
|---|---|---|
| committer | lioncash <mathew1900@hotmail.com> | 2013-04-19 09:21:45 -0400 |
| commit | d244bca1f5f210e03839d0e0a485fc5511ede2d6 (patch) | |
| tree | 7de5ce144373dcee73e460c89f379072c54f7f4f /Source/Core/InputCommon/Src/ControllerInterface/DInput/DInputJoystick.cpp | |
| parent | 47f1505499dd0ba8cd78c2d5ff3600c937d75236 (diff) | |
Fix a bunch of random typos in comments and logging.
Also update the comment headers for two functions in GCMemcard.cpp.
Diffstat (limited to 'Source/Core/InputCommon/Src/ControllerInterface/DInput/DInputJoystick.cpp')
| -rw-r--r-- | Source/Core/InputCommon/Src/ControllerInterface/DInput/DInputJoystick.cpp | 29 |
1 files changed, 14 insertions, 15 deletions
diff --git a/Source/Core/InputCommon/Src/ControllerInterface/DInput/DInputJoystick.cpp b/Source/Core/InputCommon/Src/ControllerInterface/DInput/DInputJoystick.cpp index ed5d1383ec..916d142149 100644 --- a/Source/Core/InputCommon/Src/ControllerInterface/DInput/DInputJoystick.cpp +++ b/Source/Core/InputCommon/Src/ControllerInterface/DInput/DInputJoystick.cpp @@ -22,13 +22,13 @@ static const struct } force_type_names[] = { {GUID_ConstantForce, "Constant"}, // DICONSTANTFORCE - {GUID_RampForce, "Ramp"}, // DIRAMPFORCE - {GUID_Square, "Square"}, // DIPERIODIC ... + {GUID_RampForce, "Ramp"}, // DIRAMPFORCE + {GUID_Square, "Square"}, // DIPERIODIC ... {GUID_Sine, "Sine"}, {GUID_Triangle, "Triangle"}, {GUID_SawtoothUp, "Sawtooth Up"}, {GUID_SawtoothDown, "Sawtooth Down"}, - //{GUID_Spring, "Spring"}, // DICUSTOMFORCE ... < i think + //{GUID_Spring, "Spring"}, // DICUSTOMFORCE ... < I think //{GUID_Damper, "Damper"}, //{GUID_Inertia, "Inertia"}, //{GUID_Friction, "Friction"}, @@ -70,9 +70,9 @@ void GetXInputGUIDS( std::vector<DWORD>& guids ) if( FAILED(hr) || pIWbemLocator == NULL ) goto LCleanup; - bstrNamespace = SysAllocString( L"\\\\.\\root\\cimv2" );if( bstrNamespace == NULL ) goto LCleanup; - bstrClassName = SysAllocString( L"Win32_PNPEntity" ); if( bstrClassName == NULL ) goto LCleanup; - bstrDeviceID = SysAllocString( L"DeviceID" ); if( bstrDeviceID == NULL ) goto LCleanup; + bstrNamespace = SysAllocString( L"\\\\.\\root\\cimv2" );if( bstrNamespace == NULL ) goto LCleanup; + bstrClassName = SysAllocString( L"Win32_PNPEntity" ); if( bstrClassName == NULL ) goto LCleanup; + bstrDeviceID = SysAllocString( L"DeviceID" ); if( bstrDeviceID == NULL ) goto LCleanup; // Connect to WMI hr = pIWbemLocator->ConnectServer( bstrNamespace, NULL, NULL, 0L, 0L, NULL, NULL, &pIWbemServices ); @@ -81,7 +81,7 @@ void GetXInputGUIDS( std::vector<DWORD>& guids ) // 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 ); + RPC_C_AUTHN_LEVEL_CALL, RPC_C_IMP_LEVEL_IMPERSONATE, NULL, EOAC_NONE ); hr = pIWbemServices->CreateInstanceEnum( bstrClassName, 0, NULL, &pEnumDevices ); if( FAILED(hr) || pEnumDevices == NULL ) @@ -184,7 +184,7 @@ void InitJoystick(IDirectInput8* const idi8, std::vector<ControllerInterface::De } Joystick* js = new Joystick(/*&*i, */js_device, name_counts[i->tszInstanceName]++); - // only add if it has some inputs/outpus + // only add if it has some inputs/outputs if (js->Inputs().size() || js->Outputs().size()) devices.push_back(js); else @@ -196,7 +196,6 @@ void InitJoystick(IDirectInput8* const idi8, std::vector<ControllerInterface::De js_device->Release(); } } - } } @@ -226,7 +225,7 @@ Joystick::Joystick( /*const LPCDIDEVICEINSTANCE lpddi, */const LPDIRECTINPUTDEVI if (FAILED(m_device->GetCapabilities(&js_caps))) return; - // max of 32 buttons and 4 hats / the limit of the data format i am using + // max of 32 buttons and 4 hats / the limit of the data format I am using js_caps.dwButtons = std::min((DWORD)32, js_caps.dwButtons); js_caps.dwPOVs = std::min((DWORD)4, js_caps.dwPOVs); @@ -258,9 +257,9 @@ Joystick::Joystick( /*const LPCDIDEVICEINSTANCE lpddi, */const LPDIRECTINPUTDEVI range.lMin = -(1 << 7); range.lMax = (1 << 7); m_device->SetProperty(DIPROP_RANGE, &range.diph); - // but i guess not all devices support setting range - // so i getproperty right afterward incase it didn't set :P - // this also checks that the axis is present + // but I guess not all devices support setting range + // so I getproperty right afterward incase it didn't set. + // This also checks that the axis is present if (SUCCEEDED(m_device->GetProperty(DIPROP_RANGE, &range.diph))) { const LONG base = (range.lMin + range.lMax) / 2; @@ -404,7 +403,7 @@ bool Joystick::UpdateInput() HRESULT hr = 0; // just always poll, - // msdn says if this isn't needed it doesnt do anything + // MSDN says if this isn't needed it doesn't do anything m_device->Poll(); if (m_buffered) @@ -539,7 +538,7 @@ ControlState Joystick::Button::GetState() const ControlState Joystick::Hat::GetState() const { // can this func be simplified ? - // hat centered code from msdn + // hat centered code from MSDN if (0xFFFF == LOWORD(m_hat)) return 0; return (abs((int)(m_hat / 4500 - m_direction * 2 + 8) % 8 - 4) > 2); |
