summaryrefslogtreecommitdiffhomepage
path: root/ftnoir_tracker_joystick/ftnoir_tracker_joystick.h
diff options
context:
space:
mode:
Diffstat (limited to 'ftnoir_tracker_joystick/ftnoir_tracker_joystick.h')
-rw-r--r--ftnoir_tracker_joystick/ftnoir_tracker_joystick.h16
1 files changed, 15 insertions, 1 deletions
diff --git a/ftnoir_tracker_joystick/ftnoir_tracker_joystick.h b/ftnoir_tracker_joystick/ftnoir_tracker_joystick.h
index 0958246a..ab32ec56 100644
--- a/ftnoir_tracker_joystick/ftnoir_tracker_joystick.h
+++ b/ftnoir_tracker_joystick/ftnoir_tracker_joystick.h
@@ -30,11 +30,12 @@
using namespace options;
struct settings : opts {
- value<QString> joyid;
+ value<QString> joyid, guid;
value<int> joy_1, joy_2, joy_3, joy_4, joy_5, joy_6;
settings() :
opts("tracker-joystick"),
joyid(b, "joy-id", ""),
+ guid(b, "joy-guid", ""),
joy_1(b, "axis-map-1", 1),
joy_2(b, "axis-map-2", 2),
joy_3(b, "axis-map-3", 3),
@@ -44,6 +45,18 @@ struct settings : opts {
{}
};
+template<typename = void>
+QString guid_to_string(const GUID guid)
+{
+ char buf[40] = {0};
+ wchar_t szGuidW[40] = {0};
+
+ StringFromGUID2(guid, szGuidW, 40);
+ WideCharToMultiByte(0, 0, szGuidW, -1, buf, 40, NULL, NULL);
+
+ return QString(buf);
+}
+
class FTNoIR_Tracker : public ITracker
{
public:
@@ -59,6 +72,7 @@ public:
DIDEVICEINSTANCE def;
int iter; // XXX bad style
settings s;
+ QString guid_to_check;
static constexpr int AXIS_MAX = 65535;
};