mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-17 02:45:33 +08:00
Implement log message fixmes in joystickwindows.cpp
This commit is contained in:
committed by
Klaus Basan
parent
28302feea0
commit
f62ab3266f
@@ -164,7 +164,7 @@ namespace BlackInput
|
|||||||
Q_ASSERT_X(m_directInput, Q_FUNC_INFO, "We should not get here without direct input");
|
Q_ASSERT_X(m_directInput, Q_FUNC_INFO, "We should not get here without direct input");
|
||||||
if (FAILED(hr = m_directInput->CreateDevice(deviceData.guidDevice, &m_directInputDevice, nullptr)))
|
if (FAILED(hr = m_directInput->CreateDevice(deviceData.guidDevice, &m_directInputDevice, nullptr)))
|
||||||
{
|
{
|
||||||
// FIXME: print error message
|
CLogMessage(this).warning("IDirectInput8::CreateDevice failed: ") << hr;
|
||||||
return hr;
|
return hr;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -173,14 +173,14 @@ namespace BlackInput
|
|||||||
// Set cooperative level
|
// Set cooperative level
|
||||||
if (FAILED(hr = m_directInputDevice->SetCooperativeLevel(m_helperWindow, DISCL_NONEXCLUSIVE | DISCL_BACKGROUND)))
|
if (FAILED(hr = m_directInputDevice->SetCooperativeLevel(m_helperWindow, DISCL_NONEXCLUSIVE | DISCL_BACKGROUND)))
|
||||||
{
|
{
|
||||||
// FIXME: print error message
|
CLogMessage(this).warning("IDirectInputDevice8::SetCooperativeLevel failed: ") << hr;
|
||||||
return hr;
|
return hr;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set data format to c_dfDIJoystick2
|
// Set data format to c_dfDIJoystick2
|
||||||
if (FAILED(hr = m_directInputDevice->SetDataFormat(&c_dfDIJoystick2)))
|
if (FAILED(hr = m_directInputDevice->SetDataFormat(&c_dfDIJoystick2)))
|
||||||
{
|
{
|
||||||
// FIXME: print error message
|
CLogMessage(this).warning("IDirectInputDevice8::SetDataFormat failed: ") << hr;
|
||||||
return hr;
|
return hr;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -189,14 +189,14 @@ namespace BlackInput
|
|||||||
// Get device capabilities - we are interested in the number of buttons.
|
// Get device capabilities - we are interested in the number of buttons.
|
||||||
if (FAILED(hr = m_directInputDevice->GetCapabilities(&deviceCaps)))
|
if (FAILED(hr = m_directInputDevice->GetCapabilities(&deviceCaps)))
|
||||||
{
|
{
|
||||||
// FIXME: print error message
|
CLogMessage(this).warning("IDirectInputDevice8::GetCapabilities failed: ") << hr;
|
||||||
return hr;
|
return hr;
|
||||||
}
|
}
|
||||||
|
|
||||||
m_joystickDeviceInputs.clear();
|
m_joystickDeviceInputs.clear();
|
||||||
if (FAILED(hr = m_directInputDevice->EnumObjects(enumObjectsCallback, this, DIDFT_BUTTON)))
|
if (FAILED(hr = m_directInputDevice->EnumObjects(enumObjectsCallback, this, DIDFT_BUTTON)))
|
||||||
{
|
{
|
||||||
// FIXME: print error message
|
CLogMessage(this).warning("IDirectInputDevice8::EnumObjects failed: ") << hr;
|
||||||
return hr;
|
return hr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user