mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-21 05:09:34 -06:00
Fix a bunch of random typos in comments and logging.
Also update the comment headers for two functions in GCMemcard.cpp.
This commit is contained in:
@ -33,13 +33,13 @@
|
||||
#define CIFACE_USE_ANDROID
|
||||
#endif
|
||||
|
||||
// idk in case i wanted to change it to double or somethin, idk what's best
|
||||
// idk in case I wanted to change it to double or something, idk what's best
|
||||
typedef float ControlState;
|
||||
|
||||
//
|
||||
// ControllerInterface
|
||||
//
|
||||
// some crazy shit i made to control different device inputs and outputs
|
||||
// some crazy shit I made to control different device inputs and outputs
|
||||
// from lots of different sources, hopefully more easily
|
||||
//
|
||||
class ControllerInterface
|
||||
@ -189,7 +189,7 @@ public:
|
||||
//
|
||||
// these are what you create to actually use the inputs, InputReference or OutputReference
|
||||
//
|
||||
// after being binded to devices and controls with ControllerInterface::UpdateReference,
|
||||
// after being bound to devices and controls with ControllerInterface::UpdateReference,
|
||||
// each one can link to multiple devices and controls
|
||||
// when you change a ControlReference's expression,
|
||||
// you must use ControllerInterface::UpdateReference on it to rebind controls
|
||||
|
@ -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);
|
||||
|
@ -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<ControllerInterfac
|
||||
hwnd = _hwnd;
|
||||
|
||||
// mouse and keyboard are a combined device, to allow shift+click and stuff
|
||||
// if thats dumb, i will make a VirtualDevice class that just uses ranges of inputs/outputs from other devices
|
||||
// if that's dumb, I will make a VirtualDevice class that just uses ranges of inputs/outputs from other devices
|
||||
// so there can be a separated Keyboard and mouse, as well as combined KeyboardMouse
|
||||
|
||||
LPDIRECTINPUTDEVICE8 kb_device = NULL;
|
||||
@ -181,7 +181,7 @@ bool KeyboardMouse::UpdateInput()
|
||||
|
||||
if (SUCCEEDED(kb_hr) && SUCCEEDED(mo_hr))
|
||||
{
|
||||
// need to smooth out the axes, otherwise it doesnt work for shit
|
||||
// need to smooth out the axes, otherwise it doesn't work for shit
|
||||
for (unsigned int i = 0; i < 3; ++i)
|
||||
((&m_state_in.mouse.lX)[i] += (&tmp_mouse.lX)[i]) /= 2;
|
||||
|
||||
|
@ -78,7 +78,7 @@ Device::Device(const XINPUT_CAPABILITIES& caps, u8 index)
|
||||
// get supported triggers
|
||||
for (int i = 0; i != sizeof(named_triggers)/sizeof(*named_triggers); ++i)
|
||||
{
|
||||
//BYTE val = (&caps.Gamepad.bLeftTrigger)[i]; // should be max value / msdn lies
|
||||
//BYTE val = (&caps.Gamepad.bLeftTrigger)[i]; // should be max value / MSDN lies
|
||||
if ((&caps.Gamepad.bLeftTrigger)[i])
|
||||
AddInput(new Trigger(i, (&m_state_in.Gamepad.bLeftTrigger)[i], 255 ));
|
||||
}
|
||||
@ -86,7 +86,7 @@ Device::Device(const XINPUT_CAPABILITIES& caps, u8 index)
|
||||
// get supported axes
|
||||
for (int i = 0; i != sizeof(named_axes)/sizeof(*named_axes); ++i)
|
||||
{
|
||||
//SHORT val = (&caps.Gamepad.sThumbLX)[i]; // xinput doesnt give the range / msdn is lier
|
||||
//SHORT val = (&caps.Gamepad.sThumbLX)[i]; // xinput doesn't give the range / MSDN is a liar
|
||||
if ((&caps.Gamepad.sThumbLX)[i])
|
||||
{
|
||||
const SHORT& ax = (&m_state_in.Gamepad.sThumbLX)[i];
|
||||
|
Reference in New Issue
Block a user