summaryrefslogtreecommitdiffhomepage
path: root/proto-ft
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2018-03-14 07:06:40 +0100
committerStanislaw Halik <sthalik@misaki.pl>2018-03-14 07:06:40 +0100
commit39263718846f0cc45f6ffe32a7366e74e7ed7eab (patch)
tree411de8dda979dab52d057f5d304a6fc5c4febec0 /proto-ft
parentfdcf84df07d6ec4fe41401c31f3afa480db6c8f7 (diff)
proto/ft: set game name to unknown if no entry
Diffstat (limited to 'proto-ft')
-rw-r--r--proto-ft/ftnoir_protocol_ft.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/proto-ft/ftnoir_protocol_ft.cpp b/proto-ft/ftnoir_protocol_ft.cpp
index 0c97ffd2..593fdaa9 100644
--- a/proto-ft/ftnoir_protocol_ft.cpp
+++ b/proto-ft/ftnoir_protocol_ft.cpp
@@ -105,7 +105,7 @@ void freetrack::pose(const double* headpose)
if (intGameID != id)
{
QString gamename;
- union {
+ union {
unsigned char table[8];
std::int32_t ints[2];
} t;
@@ -114,6 +114,9 @@ void freetrack::pose(const double* headpose)
(void)CSV::getGameData(id, t.table, gamename);
+ if (gamename.isEmpty())
+ gamename = _("Unknown game");
+
static_assert(sizeof(LONG) == 4, "");
static_assert(sizeof(int) == 4, "");