From d9b56a39bf966e3eddf35b02a9400a3556823750 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Fri, 16 Feb 2018 12:39:32 +0100 Subject: proto/ft: fix idempotent dataid for freetrackclient It can cause problems for `freetrackclient.dll' consumers. This fix is better than modulo rand(). --- proto-ft/ftnoir_protocol_ft.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'proto-ft/ftnoir_protocol_ft.cpp') diff --git a/proto-ft/ftnoir_protocol_ft.cpp b/proto-ft/ftnoir_protocol_ft.cpp index d240cc8d..0c97ffd2 100644 --- a/proto-ft/ftnoir_protocol_ft.cpp +++ b/proto-ft/ftnoir_protocol_ft.cpp @@ -97,7 +97,10 @@ void freetrack::pose(const double* headpose) const std::int32_t id = load(ft->GameID); - store(data->DataID, 60 * 5); + data_id++; + data_id %= 128; + + store(data->DataID, 60 * 5 + data_id); if (intGameID != id) { -- cgit v1.2.3