mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2024-11-14 21:37:52 -07:00
Fix a small formatting issue
This commit is contained in:
parent
d3e2ae35ff
commit
9b075556ea
@ -44,26 +44,15 @@ void InitKeyboardMouse(IDirectInput8* const idi8, HWND _hwnd)
|
||||
LPDIRECTINPUTDEVICE8 kb_device = nullptr;
|
||||
LPDIRECTINPUTDEVICE8 mo_device = nullptr;
|
||||
|
||||
if (SUCCEEDED(idi8->CreateDevice(GUID_SysKeyboard, &kb_device, nullptr)))
|
||||
if (SUCCEEDED(idi8->CreateDevice(GUID_SysKeyboard, &kb_device, nullptr)) &&
|
||||
SUCCEEDED(kb_device->SetDataFormat(&c_dfDIKeyboard)) &&
|
||||
SUCCEEDED(kb_device->SetCooperativeLevel(nullptr, DISCL_BACKGROUND | DISCL_NONEXCLUSIVE)) &&
|
||||
SUCCEEDED(idi8->CreateDevice(GUID_SysMouse, &mo_device, nullptr)) &&
|
||||
SUCCEEDED(mo_device->SetDataFormat(&c_dfDIMouse2)) &&
|
||||
SUCCEEDED(mo_device->SetCooperativeLevel(nullptr, DISCL_BACKGROUND | DISCL_NONEXCLUSIVE)))
|
||||
{
|
||||
if (SUCCEEDED(kb_device->SetDataFormat(&c_dfDIKeyboard)))
|
||||
{
|
||||
if (SUCCEEDED(kb_device->SetCooperativeLevel(nullptr, DISCL_BACKGROUND | DISCL_NONEXCLUSIVE)))
|
||||
{
|
||||
if (SUCCEEDED(idi8->CreateDevice(GUID_SysMouse, &mo_device, nullptr)))
|
||||
{
|
||||
if (SUCCEEDED(mo_device->SetDataFormat(&c_dfDIMouse2)))
|
||||
{
|
||||
if (SUCCEEDED(
|
||||
mo_device->SetCooperativeLevel(nullptr, DISCL_BACKGROUND | DISCL_NONEXCLUSIVE)))
|
||||
{
|
||||
g_controller_interface.AddDevice(new KeyboardMouse(kb_device, mo_device));
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
g_controller_interface.AddDevice(new KeyboardMouse(kb_device, mo_device));
|
||||
return;
|
||||
}
|
||||
|
||||
if (kb_device)
|
||||
|
Loading…
Reference in New Issue
Block a user