diff options
| author | Tomáš Pazdiora <[email protected]> | 2021-01-05 03:50:45 +0100 |
|---|---|---|
| committer | Tomáš Pazdiora <[email protected]> | 2021-01-05 04:38:32 +0100 |
| commit | 6f1098372b2016db9744ad13dffbb55b77102671 (patch) | |
| tree | ae4491ca1c80884261c19567dbe675169525e3d2 /wrapper/wrapper.cpp | |
| parent | add devicelist app (diff) | |
| download | rawaccel-6f1098372b2016db9744ad13dffbb55b77102671.tar.xz rawaccel-6f1098372b2016db9744ad13dffbb55b77102671.zip | |
add "Device Hardware ID" setting, to affect only specific device
Diffstat (limited to 'wrapper/wrapper.cpp')
| -rw-r--r-- | wrapper/wrapper.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/wrapper/wrapper.cpp b/wrapper/wrapper.cpp index fcbf2e8..7ac3a8d 100644 --- a/wrapper/wrapper.cpp +++ b/wrapper/wrapper.cpp @@ -51,7 +51,7 @@ public value struct Vec2 }; [JsonObject(ItemRequired = Required::Always)] -[StructLayout(LayoutKind::Sequential)] +[StructLayout(LayoutKind::Sequential, CharSet = CharSet::Unicode)] public ref struct DriverSettings { literal String^ Key = "Driver settings"; @@ -78,6 +78,10 @@ public ref struct DriverSettings [JsonProperty(Required = Required::Default)] double minimumTime; + [JsonProperty("Device Hardware ID", Required = Required::Default)] + [MarshalAs(UnmanagedType::ByValTStr, SizeConst = 512)] + String^ deviceHardwareID; + bool ShouldSerializeminimumTime() { return minimumTime > 0 && minimumTime != DEFAULT_TIME_MIN; |