diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2015-10-06 07:08:25 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2015-10-06 07:09:39 +0200 |
commit | a50d81c55c4364c7096fc8abcd19cfe6e25b1c07 (patch) | |
tree | 709d5ea9c0fc1157435abd974fc1f267edb7b930 | |
parent | c89ef2fe9cb1d681b1b3acdabee1786eabdf1051 (diff) |
ft: cleanup comments
-rw-r--r-- | freetrackclient/fttypes.h | 2 | ||||
-rw-r--r-- | ftnoir_protocol_ft/ftnoir_protocol_ft.cpp | 41 |
2 files changed, 23 insertions, 20 deletions
diff --git a/freetrackclient/fttypes.h b/freetrackclient/fttypes.h index 8611017a..050ffc02 100644 --- a/freetrackclient/fttypes.h +++ b/freetrackclient/fttypes.h @@ -31,7 +31,7 @@ typedef __int32 int32_t; /* only 6 headpose floats and the data id are filled -sh */ typedef struct __FTData { - volatile int DataID; + volatile unsigned int DataID; volatile int CamWidth; volatile int CamHeight; /* virtual pose */ diff --git a/ftnoir_protocol_ft/ftnoir_protocol_ft.cpp b/ftnoir_protocol_ft/ftnoir_protocol_ft.cpp index 97caaefc..6259029f 100644 --- a/ftnoir_protocol_ft/ftnoir_protocol_ft.cpp +++ b/ftnoir_protocol_ft/ftnoir_protocol_ft.cpp @@ -98,9 +98,8 @@ void FTNoIR_Protocol::pose(const double* headpose) { QString gamename; { unsigned char table[8]; - for (int i = 0; i < 8; i++) table[i] = pMemData->table[i]; - CSV::getGameData(id, table, gamename); - for (int i = 0; i < 8; i++) pMemData->table[i] = table[i]; + if (CSV::getGameData(id, table, gamename)) + for (int i = 0; i < 8; i++) pMemData->table[i] = table[i]; } ft->GameID2 = id; intGameID = id; @@ -148,8 +147,9 @@ void FTNoIR_Protocol::start_dummy() { bool FTNoIR_Protocol::correct() { - QSettings settings("Freetrack", "FreetrackClient"); // Registry settings (in HK_USER) - QSettings settingsTIR("NaturalPoint", "NATURALPOINT\\NPClient Location"); // Registry settings (in HK_USER) + // Registry settings (in HK_USER) + QSettings settings("Freetrack", "FreetrackClient"); + QSettings settingsTIR("NaturalPoint", "NATURALPOINT\\NPClient Location"); if (!shm.success()) return false; @@ -157,20 +157,23 @@ bool FTNoIR_Protocol::correct() QString aLocation = QCoreApplication::applicationDirPath() + "/"; switch (s.intUsedInterface) { - case 0: // Use both interfaces - settings.setValue( "Path" , aLocation ); - settingsTIR.setValue( "Path" , aLocation ); - break; - case 1: // Use FreeTrack, disable TrackIR - settings.setValue( "Path" , aLocation ); - settingsTIR.setValue( "Path" , "" ); - break; - case 2: // Use TrackIR, disable FreeTrack - settings.setValue( "Path" , "" ); - settingsTIR.setValue( "Path" , aLocation ); - break; - default: - break; + case 0: + // Use both interfaces + settings.setValue( "Path" , aLocation ); + settingsTIR.setValue( "Path" , aLocation ); + break; + case 1: + // Use FreeTrack, disable TrackIR + settings.setValue( "Path" , aLocation ); + settingsTIR.setValue( "Path" , "" ); + break; + case 2: + // Use TrackIR, disable FreeTrack + settings.setValue( "Path" , "" ); + settingsTIR.setValue( "Path" , aLocation ); + break; + default: + break; } if (s.useTIRViews) { |