Skip to content
Permalink
Browse files

Merge pull request #8285 from lioncash/dinput-ffe

InputCommon/DInputJoystick: Correct force-feedback flag testing
  • Loading branch information...
JosJuice committed Aug 3, 2019
2 parents 2770707 + 37d643c commit 64c0ff576c6d3ea2ee35e6b6d7ea8c814442d53f
Showing with 2 additions and 3 deletions.
  1. +2 −3 Source/Core/InputCommon/ControllerInterface/DInput/DInputJoystick.cpp
@@ -164,9 +164,8 @@ Joystick::Joystick(/*const LPCDIDEVICEINSTANCE lpddi, */ const LPDIRECTINPUTDEVI
if (SUCCEEDED(m_device->EnumObjects(DIEnumDeviceObjectsCallback, (LPVOID)&objects, DIDFT_AXIS)))
{
const int num_ff_axes =
std::count_if(std::begin(objects), std::end(objects), [](DIDEVICEOBJECTINSTANCE& pdidoi) {
return pdidoi.dwFlags && DIDOI_FFACTUATOR;
});
std::count_if(std::begin(objects), std::end(objects),
[](const auto& pdidoi) { return (pdidoi.dwFlags & DIDOI_FFACTUATOR) != 0; });
InitForceFeedback(m_device, num_ff_axes);
}

0 comments on commit 64c0ff5

Please sign in to comment.
You can’t perform that action at this time.