summaryrefslogtreecommitdiffhomepage
path: root/ftnoir_protocol_ft/ftnoir_protocol_ft.cpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2015-10-06 07:08:25 +0200
committerStanislaw Halik <sthalik@misaki.pl>2015-10-06 07:09:39 +0200
commita50d81c55c4364c7096fc8abcd19cfe6e25b1c07 (patch)
tree709d5ea9c0fc1157435abd974fc1f267edb7b930 /ftnoir_protocol_ft/ftnoir_protocol_ft.cpp
parentc89ef2fe9cb1d681b1b3acdabee1786eabdf1051 (diff)
ft: cleanup comments
Diffstat (limited to 'ftnoir_protocol_ft/ftnoir_protocol_ft.cpp')
-rw-r--r--ftnoir_protocol_ft/ftnoir_protocol_ft.cpp41
1 files changed, 22 insertions, 19 deletions
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) {