mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-06-11 16:49:28 +02:00
Reformat all the things. Have fun with merge conflicts.
This commit is contained in:
@ -16,50 +16,47 @@ namespace ciface
|
||||
{
|
||||
namespace DInput
|
||||
{
|
||||
|
||||
BOOL CALLBACK DIEnumDeviceObjectsCallback(LPCDIDEVICEOBJECTINSTANCE lpddoi, LPVOID pvRef)
|
||||
{
|
||||
((std::list<DIDEVICEOBJECTINSTANCE>*)pvRef)->push_back(*lpddoi);
|
||||
return DIENUM_CONTINUE;
|
||||
((std::list<DIDEVICEOBJECTINSTANCE>*)pvRef)->push_back(*lpddoi);
|
||||
return DIENUM_CONTINUE;
|
||||
}
|
||||
|
||||
BOOL CALLBACK DIEnumDevicesCallback(LPCDIDEVICEINSTANCE lpddi, LPVOID pvRef)
|
||||
{
|
||||
((std::list<DIDEVICEINSTANCE>*)pvRef)->push_back(*lpddi);
|
||||
return DIENUM_CONTINUE;
|
||||
((std::list<DIDEVICEINSTANCE>*)pvRef)->push_back(*lpddi);
|
||||
return DIENUM_CONTINUE;
|
||||
}
|
||||
|
||||
std::string GetDeviceName(const LPDIRECTINPUTDEVICE8 device)
|
||||
{
|
||||
DIPROPSTRING str = {};
|
||||
str.diph.dwSize = sizeof(str);
|
||||
str.diph.dwHeaderSize = sizeof(str.diph);
|
||||
str.diph.dwHow = DIPH_DEVICE;
|
||||
DIPROPSTRING str = {};
|
||||
str.diph.dwSize = sizeof(str);
|
||||
str.diph.dwHeaderSize = sizeof(str.diph);
|
||||
str.diph.dwHow = DIPH_DEVICE;
|
||||
|
||||
std::string result;
|
||||
if (SUCCEEDED(device->GetProperty(DIPROP_PRODUCTNAME, &str.diph)))
|
||||
{
|
||||
result = StripSpaces(UTF16ToUTF8(str.wsz));
|
||||
}
|
||||
std::string result;
|
||||
if (SUCCEEDED(device->GetProperty(DIPROP_PRODUCTNAME, &str.diph)))
|
||||
{
|
||||
result = StripSpaces(UTF16ToUTF8(str.wsz));
|
||||
}
|
||||
|
||||
return result;
|
||||
return result;
|
||||
}
|
||||
|
||||
void Init(std::vector<Core::Device*>& devices, HWND hwnd)
|
||||
{
|
||||
IDirectInput8* idi8;
|
||||
if (FAILED(DirectInput8Create(GetModuleHandle(nullptr), DIRECTINPUT_VERSION,
|
||||
IID_IDirectInput8, (LPVOID*)&idi8, nullptr)))
|
||||
{
|
||||
return;
|
||||
}
|
||||
IDirectInput8* idi8;
|
||||
if (FAILED(DirectInput8Create(GetModuleHandle(nullptr), DIRECTINPUT_VERSION, IID_IDirectInput8,
|
||||
(LPVOID*)&idi8, nullptr)))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
InitKeyboardMouse(idi8, devices, hwnd);
|
||||
InitJoystick(idi8, devices, hwnd);
|
||||
|
||||
idi8->Release();
|
||||
|
||||
}
|
||||
InitKeyboardMouse(idi8, devices, hwnd);
|
||||
InitJoystick(idi8, devices, hwnd);
|
||||
|
||||
idi8->Release();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user