From cdcc4eb3e5549e9302906a8f9944681a9623d96f Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Fri, 5 Apr 2013 11:46:11 +0200 Subject: Project Evil: if you have to ask, you don't wanna know. --- ftnoir_protocol_ft/ftnoir_protocol_ft.cpp | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/ftnoir_protocol_ft/ftnoir_protocol_ft.cpp b/ftnoir_protocol_ft/ftnoir_protocol_ft.cpp index 73856a2b..bd9b7746 100644 --- a/ftnoir_protocol_ft/ftnoir_protocol_ft.cpp +++ b/ftnoir_protocol_ft/ftnoir_protocol_ft.cpp @@ -141,7 +141,12 @@ void FTNoIR_Protocol::getGameData( QString gameID ){ QByteArray id = gameLine.at(7).toAscii(); int tmp[8]; int fuzz[3]; - if (sscanf(id.constData(), + if (gameLine.at(3) == QString("V160")) + { + qDebug() << "no table"; + memset(pMemData->table, 0, 8); + } + else if (sscanf(id.constData(), "%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x", fuzz + 2, fuzz + 0, @@ -161,7 +166,7 @@ void FTNoIR_Protocol::getGameData( QString gameID ){ else for (int i = 0; i < 8; i++) pMemData->table[i] = tmp[i]; - qDebug() << "game-id" << gameLine.at(7); + qDebug() << gameID << "game-id" << gameLine.at(7); game_name = gameLine.at(1); file.close(); return; @@ -175,7 +180,7 @@ void FTNoIR_Protocol::getGameData( QString gameID ){ // If the gameID was NOT found, fill only the name "Unknown game connected" // qDebug() << "Unknown game connected" << pMemData->GameID; - file.close(); + file.close(); } // @@ -282,6 +287,7 @@ float headRotZ; // if (intGameID != pMemData->GameID) { + memset(pMemData->table, 0, 8); QString gameID = QString::number(pMemData->GameID); getGameData(gameID); pMemData->GameID2 = pMemData->GameID; -- cgit v1.2.3