From 1edb87b13a58cbb87cbf99ee30cc5ee7eb15003a Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Sat, 27 Apr 2013 12:48:22 +0200 Subject: Implement game name in the UI, lost previously due to refactoring. --- ftnoir_protocol_wine/ftnoir_protocol_wine.cpp | 2 ++ ftnoir_protocol_wine/ftnoir_protocol_wine.h | 7 +++++++ 2 files changed, 9 insertions(+) (limited to 'ftnoir_protocol_wine') diff --git a/ftnoir_protocol_wine/ftnoir_protocol_wine.cpp b/ftnoir_protocol_wine/ftnoir_protocol_wine.cpp index 2f4e64e7..27b36c33 100644 --- a/ftnoir_protocol_wine/ftnoir_protocol_wine.cpp +++ b/ftnoir_protocol_wine/ftnoir_protocol_wine.cpp @@ -82,6 +82,8 @@ void FTNoIR_Protocol::sendHeadposeToGame( double *headpose, double *rawheadpose bool tmp1, tmp2; CSV::getGameData(id_str, tmp1, tmp2, shm->table, gamename); gameid = shm->gameid2 = shm->gameid; + QMutexLocker(&game_name_mutex); + connected_game = gamename; } lck_shm.unlock(); } diff --git a/ftnoir_protocol_wine/ftnoir_protocol_wine.h b/ftnoir_protocol_wine/ftnoir_protocol_wine.h index 8b3ea739..d9c37e27 100644 --- a/ftnoir_protocol_wine/ftnoir_protocol_wine.h +++ b/ftnoir_protocol_wine/ftnoir_protocol_wine.h @@ -37,6 +37,7 @@ #include #include #include +#include #include #include "facetracknoir/global-settings.h" #include "compat/compat.h" @@ -59,6 +60,12 @@ private: WineSHM* shm; QProcess wrapper; int gameid; + QString game_name; + QMutex game_name_mutex; + QString getGameName() { + QMutexLocker(&game_name_mutex); + return game_name; + } }; // Widget that has controls for FTNoIR protocol client-settings. -- cgit v1.2.3