2015-05-24 04:55:12 +00:00
|
|
|
// Copyright 2010 Dolphin Emulator Project
|
2021-07-05 01:22:19 +00:00
|
|
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
2010-04-02 02:48:24 +00:00
|
|
|
|
2021-12-10 02:22:16 +00:00
|
|
|
#include "InputCommon/ControllerInterface/DInput/DInputJoystick.h"
|
|
|
|
|
2014-02-17 10:18:15 +00:00
|
|
|
#include <algorithm>
|
2019-01-06 14:14:37 +00:00
|
|
|
#include <limits>
|
2021-05-15 09:21:22 +00:00
|
|
|
#include <mutex>
|
2019-03-09 15:57:37 +00:00
|
|
|
#include <set>
|
2013-06-17 00:07:10 +00:00
|
|
|
#include <sstream>
|
2019-03-09 15:57:37 +00:00
|
|
|
#include <type_traits>
|
2014-02-19 01:17:31 +00:00
|
|
|
|
2021-12-12 21:50:18 +00:00
|
|
|
#include "Common/HRWrap.h"
|
2018-12-29 15:10:48 +00:00
|
|
|
#include "Common/Logging/Log.h"
|
2016-06-12 15:08:04 +00:00
|
|
|
#include "InputCommon/ControllerInterface/ControllerInterface.h"
|
2014-02-19 01:17:31 +00:00
|
|
|
#include "InputCommon/ControllerInterface/DInput/DInput.h"
|
2014-09-01 05:41:33 +00:00
|
|
|
#include "InputCommon/ControllerInterface/DInput/XInputFilter.h"
|
2013-06-27 03:26:21 +00:00
|
|
|
|
2019-06-17 20:39:24 +00:00
|
|
|
namespace ciface::DInput
|
2010-04-02 02:48:24 +00:00
|
|
|
{
|
2019-03-09 15:57:37 +00:00
|
|
|
constexpr DWORD DATA_BUFFER_SIZE = 32;
|
|
|
|
|
|
|
|
struct GUIDComparator
|
|
|
|
{
|
|
|
|
bool operator()(const GUID& left, const GUID& right) const
|
|
|
|
{
|
|
|
|
static_assert(std::is_trivially_copyable_v<GUID>);
|
|
|
|
|
|
|
|
return memcmp(&left, &right, sizeof(left)) < 0;
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
static std::set<GUID, GUIDComparator> s_guids_in_use;
|
2021-05-15 09:21:22 +00:00
|
|
|
static std::mutex s_guids_mutex;
|
2010-06-05 05:30:23 +00:00
|
|
|
|
2016-06-12 15:08:04 +00:00
|
|
|
void InitJoystick(IDirectInput8* const idi8, HWND hwnd)
|
2010-04-02 02:48:24 +00:00
|
|
|
{
|
2010-06-21 03:12:16 +00:00
|
|
|
std::list<DIDEVICEINSTANCE> joysticks;
|
2014-09-01 05:41:33 +00:00
|
|
|
idi8->EnumDevices(DI8DEVCLASS_GAMECTRL, DIEnumDevicesCallback, (LPVOID)&joysticks,
|
|
|
|
DIEDFL_ATTACHEDONLY);
|
2016-06-24 08:43:46 +00:00
|
|
|
|
2016-08-10 23:30:36 +00:00
|
|
|
std::unordered_set<DWORD> xinput_guids = GetXInputGUIDS();
|
2014-01-31 00:51:21 +00:00
|
|
|
for (DIDEVICEINSTANCE& joystick : joysticks)
|
2010-04-02 02:48:24 +00:00
|
|
|
{
|
2019-03-09 15:57:37 +00:00
|
|
|
// Skip XInput Devices
|
2016-08-10 23:30:36 +00:00
|
|
|
if (xinput_guids.count(joystick.guidProduct.Data1))
|
2014-08-20 03:06:27 +00:00
|
|
|
{
|
2010-04-02 02:48:24 +00:00
|
|
|
continue;
|
2014-08-20 03:06:27 +00:00
|
|
|
}
|
2016-06-24 08:43:46 +00:00
|
|
|
|
2019-03-09 15:57:37 +00:00
|
|
|
// Skip devices we are already using.
|
|
|
|
{
|
2021-05-15 09:21:22 +00:00
|
|
|
std::lock_guard lk(s_guids_mutex);
|
|
|
|
if (s_guids_in_use.count(joystick.guidInstance))
|
|
|
|
{
|
|
|
|
continue;
|
|
|
|
}
|
2019-03-09 15:57:37 +00:00
|
|
|
}
|
|
|
|
|
2010-04-02 02:48:24 +00:00
|
|
|
LPDIRECTINPUTDEVICE8 js_device;
|
2021-05-15 09:21:22 +00:00
|
|
|
// Don't print any warnings on failure
|
2014-03-09 20:14:26 +00:00
|
|
|
if (SUCCEEDED(idi8->CreateDevice(joystick.guidInstance, &js_device, nullptr)))
|
2010-04-02 02:48:24 +00:00
|
|
|
{
|
2010-06-12 02:08:01 +00:00
|
|
|
if (SUCCEEDED(js_device->SetDataFormat(&c_dfDIJoystick)))
|
2010-04-02 02:48:24 +00:00
|
|
|
{
|
2021-12-12 21:50:18 +00:00
|
|
|
HRESULT hr = js_device->SetCooperativeLevel(GetAncestor(hwnd, GA_ROOT),
|
|
|
|
DISCL_BACKGROUND | DISCL_EXCLUSIVE);
|
|
|
|
if (FAILED(hr))
|
2010-06-05 05:30:23 +00:00
|
|
|
{
|
2021-12-12 21:50:18 +00:00
|
|
|
WARN_LOG_FMT(CONTROLLERINTERFACE,
|
|
|
|
"DInput: Failed to acquire device exclusively. Force feedback will be "
|
|
|
|
"unavailable. {}",
|
|
|
|
Common::HRWrap(hr));
|
2018-12-29 15:10:48 +00:00
|
|
|
// Fall back to non-exclusive mode, with no rumble
|
2014-03-09 20:14:26 +00:00
|
|
|
if (FAILED(
|
|
|
|
js_device->SetCooperativeLevel(nullptr, DISCL_BACKGROUND | DISCL_NONEXCLUSIVE)))
|
2010-06-05 05:30:23 +00:00
|
|
|
{
|
|
|
|
js_device->Release();
|
|
|
|
continue;
|
|
|
|
}
|
2016-06-24 08:43:46 +00:00
|
|
|
}
|
|
|
|
|
2016-07-14 08:25:52 +00:00
|
|
|
auto js = std::make_shared<Joystick>(js_device);
|
2021-05-15 09:21:22 +00:00
|
|
|
// only add if it has some inputs/outputs.
|
|
|
|
// Don't even add it to our static list in case we first created it without a window handle,
|
|
|
|
// failing to get exclusive mode, and then later managed to obtain it, which mean it
|
|
|
|
// could now have some outputs if it didn't before.
|
2010-06-05 05:30:23 +00:00
|
|
|
if (js->Inputs().size() || js->Outputs().size())
|
2021-05-15 09:21:22 +00:00
|
|
|
{
|
|
|
|
if (g_controller_interface.AddDevice(std::move(js)))
|
|
|
|
{
|
|
|
|
std::lock_guard lk(s_guids_mutex);
|
|
|
|
s_guids_in_use.insert(joystick.guidInstance);
|
|
|
|
}
|
|
|
|
}
|
2010-04-02 02:48:24 +00:00
|
|
|
}
|
|
|
|
else
|
2010-06-05 05:30:23 +00:00
|
|
|
{
|
|
|
|
js_device->Release();
|
|
|
|
}
|
2010-04-02 02:48:24 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-05-15 09:21:22 +00:00
|
|
|
Joystick::Joystick(const LPDIRECTINPUTDEVICE8 device) : m_device(device)
|
2010-04-02 02:48:24 +00:00
|
|
|
{
|
2010-10-09 07:24:33 +00:00
|
|
|
// seems this needs to be done before GetCapabilities
|
|
|
|
// polled or buffered data
|
|
|
|
DIPROPDWORD dipdw;
|
|
|
|
dipdw.diph.dwSize = sizeof(DIPROPDWORD);
|
|
|
|
dipdw.diph.dwHeaderSize = sizeof(DIPROPHEADER);
|
|
|
|
dipdw.diph.dwObj = 0;
|
|
|
|
dipdw.diph.dwHow = DIPH_DEVICE;
|
|
|
|
dipdw.dwData = DATA_BUFFER_SIZE;
|
|
|
|
// set the buffer size,
|
|
|
|
// if we can't set the property, we can't use buffered data
|
|
|
|
m_buffered = SUCCEEDED(m_device->SetProperty(DIPROP_BUFFERSIZE, &dipdw.diph));
|
2016-06-24 08:43:46 +00:00
|
|
|
|
2010-10-09 07:24:33 +00:00
|
|
|
// seems this needs to be done after SetProperty of buffer size
|
|
|
|
m_device->Acquire();
|
2016-06-24 08:43:46 +00:00
|
|
|
|
2010-04-02 02:48:24 +00:00
|
|
|
// get joystick caps
|
|
|
|
DIDEVCAPS js_caps;
|
|
|
|
js_caps.dwSize = sizeof(js_caps);
|
2010-09-02 00:03:25 +00:00
|
|
|
if (FAILED(m_device->GetCapabilities(&js_caps)))
|
|
|
|
return;
|
2016-06-24 08:43:46 +00:00
|
|
|
|
2013-04-19 13:21:45 +00:00
|
|
|
// max of 32 buttons and 4 hats / the limit of the data format I am using
|
2010-04-02 02:48:24 +00:00
|
|
|
js_caps.dwButtons = std::min((DWORD)32, js_caps.dwButtons);
|
|
|
|
js_caps.dwPOVs = std::min((DWORD)4, js_caps.dwPOVs);
|
2016-06-24 08:43:46 +00:00
|
|
|
|
2010-09-02 00:03:25 +00:00
|
|
|
// m_must_poll = (js_caps.dwFlags & DIDC_POLLEDDATAFORMAT) != 0;
|
2016-06-24 08:43:46 +00:00
|
|
|
|
2010-04-02 02:48:24 +00:00
|
|
|
// buttons
|
2011-03-14 01:20:11 +00:00
|
|
|
for (u8 i = 0; i != js_caps.dwButtons; ++i)
|
2011-03-14 21:07:28 +00:00
|
|
|
AddInput(new Button(i, m_state_in.rgbButtons[i]));
|
2016-06-24 08:43:46 +00:00
|
|
|
|
2010-04-02 02:48:24 +00:00
|
|
|
// hats
|
2011-03-14 01:20:11 +00:00
|
|
|
for (u8 i = 0; i != js_caps.dwPOVs; ++i)
|
2010-04-02 02:48:24 +00:00
|
|
|
{
|
|
|
|
// each hat gets 4 input instances associated with it, (up down left right)
|
2011-03-14 01:20:11 +00:00
|
|
|
for (u8 d = 0; d != 4; ++d)
|
2012-05-02 06:31:38 +00:00
|
|
|
AddInput(new Hat(i, m_state_in.rgdwPOV[i], d));
|
2010-04-02 02:48:24 +00:00
|
|
|
}
|
2016-06-24 08:43:46 +00:00
|
|
|
|
2010-04-02 02:48:24 +00:00
|
|
|
// get up to 6 axes and 2 sliders
|
2010-09-02 00:03:25 +00:00
|
|
|
DIPROPRANGE range;
|
|
|
|
range.diph.dwSize = sizeof(range);
|
|
|
|
range.diph.dwHeaderSize = sizeof(range.diph);
|
|
|
|
range.diph.dwHow = DIPH_BYOFFSET;
|
2010-08-29 03:45:56 +00:00
|
|
|
// screw EnumObjects, just go through all the axis offsets and try to GetProperty
|
|
|
|
// this should be more foolproof, less code, and probably faster
|
|
|
|
for (unsigned int offset = 0; offset < DIJOFS_BUTTON(0) / sizeof(LONG); ++offset)
|
2010-04-02 02:48:24 +00:00
|
|
|
{
|
2010-08-29 03:45:56 +00:00
|
|
|
range.diph.dwObj = offset * sizeof(LONG);
|
2019-01-06 14:14:37 +00:00
|
|
|
// Try to set a range with 16 bits of precision:
|
|
|
|
range.lMin = std::numeric_limits<s16>::min();
|
|
|
|
range.lMax = std::numeric_limits<s16>::max();
|
2010-08-29 03:45:56 +00:00
|
|
|
m_device->SetProperty(DIPROP_RANGE, &range.diph);
|
2019-01-06 14:14:37 +00:00
|
|
|
// Not all devices support setting DIPROP_RANGE so we must GetProperty right back.
|
|
|
|
// This also checks that the axis is present.
|
|
|
|
// Note: Even though not all devices support setting DIPROP_RANGE, some require it.
|
2010-06-21 03:12:16 +00:00
|
|
|
if (SUCCEEDED(m_device->GetProperty(DIPROP_RANGE, &range.diph)))
|
2010-04-02 02:48:24 +00:00
|
|
|
{
|
2010-08-29 03:45:56 +00:00
|
|
|
const LONG base = (range.lMin + range.lMax) / 2;
|
2011-03-14 21:07:28 +00:00
|
|
|
const LONG& ax = (&m_state_in.lX)[offset];
|
2016-06-24 08:43:46 +00:00
|
|
|
|
2010-08-29 03:45:56 +00:00
|
|
|
// each axis gets a negative and a positive input instance associated with it
|
2013-01-17 21:41:18 +00:00
|
|
|
AddAnalogInputs(new Axis(offset, ax, base, range.lMin - base),
|
|
|
|
new Axis(offset, ax, base, range.lMax - base));
|
2010-04-02 02:48:24 +00:00
|
|
|
}
|
|
|
|
}
|
2016-06-24 08:43:46 +00:00
|
|
|
|
2018-12-29 15:10:48 +00:00
|
|
|
// Force feedback:
|
2010-06-21 03:12:16 +00:00
|
|
|
std::list<DIDEVICEOBJECTINSTANCE> objects;
|
2014-02-05 10:28:32 +00:00
|
|
|
if (SUCCEEDED(m_device->EnumObjects(DIEnumDeviceObjectsCallback, (LPVOID)&objects, DIDFT_AXIS)))
|
2010-04-02 02:48:24 +00:00
|
|
|
{
|
2018-12-29 15:10:48 +00:00
|
|
|
const int num_ff_axes =
|
2019-08-02 14:16:26 +00:00
|
|
|
std::count_if(std::begin(objects), std::end(objects),
|
|
|
|
[](const auto& pdidoi) { return (pdidoi.dwFlags & DIDOI_FFACTUATOR) != 0; });
|
2018-12-29 15:10:48 +00:00
|
|
|
InitForceFeedback(m_device, num_ff_axes);
|
2010-04-02 02:48:24 +00:00
|
|
|
}
|
2016-06-24 08:43:46 +00:00
|
|
|
|
2018-12-29 15:10:48 +00:00
|
|
|
// Set hats to center:
|
2019-03-19 20:54:36 +00:00
|
|
|
// "The center position is normally reported as -1" -MSDN
|
|
|
|
std::fill(std::begin(m_state_in.rgdwPOV), std::end(m_state_in.rgdwPOV), -1);
|
2010-04-02 02:48:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
Joystick::~Joystick()
|
|
|
|
{
|
2019-03-09 15:57:37 +00:00
|
|
|
DIDEVICEINSTANCE info = {};
|
|
|
|
info.dwSize = sizeof(info);
|
|
|
|
if (SUCCEEDED(m_device->GetDeviceInfo(&info)))
|
|
|
|
{
|
2021-05-15 09:21:22 +00:00
|
|
|
std::lock_guard lk(s_guids_mutex);
|
2019-03-09 15:57:37 +00:00
|
|
|
s_guids_in_use.erase(info.guidInstance);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2021-05-15 09:21:22 +00:00
|
|
|
ERROR_LOG_FMT(CONTROLLERINTERFACE, "DInputJoystick: GetDeviceInfo failed.");
|
2019-03-09 15:57:37 +00:00
|
|
|
}
|
|
|
|
|
2018-12-22 23:49:03 +00:00
|
|
|
DeInitForceFeedback();
|
|
|
|
|
2010-04-02 02:48:24 +00:00
|
|
|
m_device->Unacquire();
|
|
|
|
m_device->Release();
|
|
|
|
}
|
|
|
|
|
|
|
|
std::string Joystick::GetName() const
|
|
|
|
{
|
2010-06-21 03:12:16 +00:00
|
|
|
return GetDeviceName(m_device);
|
2010-04-02 02:48:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
std::string Joystick::GetSource() const
|
|
|
|
{
|
2010-06-21 03:12:16 +00:00
|
|
|
return DINPUT_SOURCE_NAME;
|
2010-04-02 02:48:24 +00:00
|
|
|
}
|
|
|
|
|
2019-03-09 15:57:37 +00:00
|
|
|
bool Joystick::IsValid() const
|
|
|
|
{
|
|
|
|
return SUCCEEDED(m_device->Acquire());
|
|
|
|
}
|
2010-04-02 02:48:24 +00:00
|
|
|
|
2014-11-13 08:55:14 +00:00
|
|
|
void Joystick::UpdateInput()
|
2010-04-02 02:48:24 +00:00
|
|
|
{
|
2010-06-05 05:30:23 +00:00
|
|
|
HRESULT hr = 0;
|
2016-06-24 08:43:46 +00:00
|
|
|
|
2010-09-02 00:03:25 +00:00
|
|
|
// just always poll,
|
2013-04-19 13:21:45 +00:00
|
|
|
// MSDN says if this isn't needed it doesn't do anything
|
2010-09-02 00:03:25 +00:00
|
|
|
m_device->Poll();
|
2016-06-24 08:43:46 +00:00
|
|
|
|
2010-09-02 00:03:25 +00:00
|
|
|
if (m_buffered)
|
|
|
|
{
|
|
|
|
DIDEVICEOBJECTDATA evtbuf[DATA_BUFFER_SIZE];
|
|
|
|
DWORD numevents = DATA_BUFFER_SIZE;
|
2010-06-05 05:30:23 +00:00
|
|
|
hr = m_device->GetDeviceData(sizeof(*evtbuf), evtbuf, &numevents, 0);
|
2016-06-24 08:43:46 +00:00
|
|
|
|
2010-06-12 02:08:01 +00:00
|
|
|
if (SUCCEEDED(hr))
|
2010-06-05 05:30:23 +00:00
|
|
|
{
|
2010-06-12 02:08:01 +00:00
|
|
|
for (LPDIDEVICEOBJECTDATA evt = evtbuf; evt != (evtbuf + numevents); ++evt)
|
2010-06-05 05:30:23 +00:00
|
|
|
{
|
|
|
|
// all the buttons are at the end of the data format
|
|
|
|
// they are bytes rather than longs
|
|
|
|
if (evt->dwOfs < DIJOFS_BUTTON(0))
|
2010-06-12 02:08:01 +00:00
|
|
|
*(DWORD*)(((BYTE*)&m_state_in) + evt->dwOfs) = evt->dwData;
|
2010-06-05 05:30:23 +00:00
|
|
|
else
|
2010-06-12 02:08:01 +00:00
|
|
|
((BYTE*)&m_state_in)[evt->dwOfs] = (BYTE)evt->dwData;
|
2010-06-05 05:30:23 +00:00
|
|
|
}
|
2016-06-24 08:43:46 +00:00
|
|
|
|
2010-10-03 04:29:34 +00:00
|
|
|
// seems like this needs to be done maybe...
|
2010-06-12 02:08:01 +00:00
|
|
|
if (DI_BUFFEROVERFLOW == hr)
|
2010-09-02 00:03:25 +00:00
|
|
|
hr = m_device->GetDeviceState(sizeof(m_state_in), &m_state_in);
|
2010-06-05 05:30:23 +00:00
|
|
|
}
|
|
|
|
}
|
2010-09-02 00:03:25 +00:00
|
|
|
else
|
2013-04-15 02:53:10 +00:00
|
|
|
{
|
2010-09-02 00:03:25 +00:00
|
|
|
hr = m_device->GetDeviceState(sizeof(m_state_in), &m_state_in);
|
2013-04-15 02:53:10 +00:00
|
|
|
}
|
2016-06-24 08:43:46 +00:00
|
|
|
|
2010-04-06 22:43:12 +00:00
|
|
|
// try reacquire if input lost
|
2010-06-05 05:30:23 +00:00
|
|
|
if (DIERR_INPUTLOST == hr || DIERR_NOTACQUIRED == hr)
|
2014-11-13 08:55:14 +00:00
|
|
|
m_device->Acquire();
|
2010-04-02 02:48:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// get name
|
|
|
|
|
|
|
|
std::string Joystick::Button::GetName() const
|
|
|
|
{
|
|
|
|
std::ostringstream ss;
|
2011-03-14 21:07:28 +00:00
|
|
|
ss << "Button " << (int)m_index;
|
2010-04-02 02:48:24 +00:00
|
|
|
return ss.str();
|
|
|
|
}
|
|
|
|
|
|
|
|
std::string Joystick::Axis::GetName() const
|
|
|
|
{
|
|
|
|
std::ostringstream ss;
|
|
|
|
// axis
|
2010-07-16 03:43:11 +00:00
|
|
|
if (m_index < 6)
|
2010-04-02 02:48:24 +00:00
|
|
|
{
|
2010-07-16 03:43:11 +00:00
|
|
|
ss << "Axis " << (char)('X' + (m_index % 3));
|
2011-03-14 21:07:28 +00:00
|
|
|
if (m_index > 2)
|
2010-04-02 02:48:24 +00:00
|
|
|
ss << 'r';
|
|
|
|
}
|
|
|
|
// slider
|
|
|
|
else
|
2013-04-15 02:53:10 +00:00
|
|
|
{
|
2011-03-14 21:07:28 +00:00
|
|
|
ss << "Slider " << (int)(m_index - 6);
|
2013-04-15 02:53:10 +00:00
|
|
|
}
|
2016-06-24 08:43:46 +00:00
|
|
|
|
2011-03-14 21:07:28 +00:00
|
|
|
ss << (m_range < 0 ? '-' : '+');
|
2010-04-02 02:48:24 +00:00
|
|
|
return ss.str();
|
|
|
|
}
|
|
|
|
|
|
|
|
std::string Joystick::Hat::GetName() const
|
|
|
|
{
|
2022-07-15 17:53:10 +00:00
|
|
|
char tmpstr[] = "Hat . .";
|
2010-07-16 03:43:11 +00:00
|
|
|
tmpstr[4] = (char)('0' + m_index);
|
|
|
|
tmpstr[6] = "NESW"[m_direction];
|
|
|
|
return tmpstr;
|
2010-04-02 02:48:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// get / set state
|
|
|
|
|
2011-03-14 01:20:11 +00:00
|
|
|
ControlState Joystick::Axis::GetState() const
|
2010-04-02 02:48:24 +00:00
|
|
|
{
|
2019-02-27 01:46:21 +00:00
|
|
|
return ControlState(m_axis - m_base) / m_range;
|
2010-04-02 02:48:24 +00:00
|
|
|
}
|
|
|
|
|
2011-03-14 01:20:11 +00:00
|
|
|
ControlState Joystick::Button::GetState() const
|
2010-04-02 02:48:24 +00:00
|
|
|
{
|
2011-03-14 01:20:11 +00:00
|
|
|
return ControlState(m_button > 0);
|
2010-04-02 02:48:24 +00:00
|
|
|
}
|
|
|
|
|
2011-03-14 01:20:11 +00:00
|
|
|
ControlState Joystick::Hat::GetState() const
|
2010-04-02 02:48:24 +00:00
|
|
|
{
|
2019-03-19 20:54:36 +00:00
|
|
|
// "Some drivers report the centered position of the POV indicator as 65,535.
|
|
|
|
// Determine whether the indicator is centered as follows" -MSDN
|
|
|
|
const bool is_centered = (0xffff == LOWORD(m_hat));
|
|
|
|
|
|
|
|
if (is_centered)
|
2010-04-02 02:48:24 +00:00
|
|
|
return 0;
|
2014-01-31 00:51:21 +00:00
|
|
|
|
2020-02-09 00:21:14 +00:00
|
|
|
return (std::abs(int(m_hat / 4500 - m_direction * 2 + 8) % 8 - 4) > 2);
|
2010-04-02 02:48:24 +00:00
|
|
|
}
|
2019-06-17 20:39:24 +00:00
|
|
|
} // namespace ciface::DInput
|