WIP: Windows specific 3Dconnexion using WM_INPUT.

This implementation works with the 3DConnexion driver (sic!)
if PrusaSlicer.xml is stored into c:\Program Files\3Dconnexion\3DxWare\3DxWinCore64\Cfg\

The implementation is inspired with Blender, see code inside WITH_INPUT_NDOF blocks.
This commit is contained in:
bubnikv 2020-03-31 09:01:48 +02:00
parent 70baa0d246
commit 25d58faaad
4 changed files with 66 additions and 60 deletions

View file

@ -152,6 +152,16 @@ DPIFrame(NULL, wxID_ANY, "", wxDefaultPosition, wxDefaultSize, wxDEFAULT_FRAME_S
// Failed to get desktop location
assert(false);
}
{
static constexpr int device_count = 1;
RAWINPUTDEVICE devices[device_count] = { 0 };
// multi-axis mouse (SpaceNavigator, etc.)
devices[0].usUsagePage = 0x01;
devices[0].usUsage = 0x08;
if (! RegisterRawInputDevices(devices, device_count, sizeof(RAWINPUTDEVICE)))
BOOST_LOG_TRIVIAL(error) << "RegisterRawInputDevices failed";
}
#endif // _WIN32
// propagate event