summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authormm0zct <the_cartographer@hotmail.com>2013-10-19 16:51:13 +0100
committermm0zct <the_cartographer@hotmail.com>2013-10-19 16:51:13 +0100
commit5dbc97ebc29bdfe540cd44ab12997ad1310b1057 (patch)
treeaea17f513b59ab9d52fe30006da823c44406839c
parentd90cbf7c0ad8a530e6dca3fc03189ef648159d0d (diff)
Fixed FT2.0 tracker to actually start and kill TrackIR.exe dummy correctly
-mm0zct&shalik
-rw-r--r--ftnoir_protocol_ft/ftnoir_protocol_ft.cpp12
1 files changed, 9 insertions, 3 deletions
diff --git a/ftnoir_protocol_ft/ftnoir_protocol_ft.cpp b/ftnoir_protocol_ft/ftnoir_protocol_ft.cpp
index 65d877a7..ec5972fc 100644
--- a/ftnoir_protocol_ft/ftnoir_protocol_ft.cpp
+++ b/ftnoir_protocol_ft/ftnoir_protocol_ft.cpp
@@ -32,6 +32,7 @@
FTNoIR_Protocol::FTNoIR_Protocol() :
shm(FT_MM_DATA, FREETRACK_MUTEX, sizeof(FTMemMap))
{
+ fprintf(stderr,"calling constructor\n");
pMemData = (FTMemMap*) shm.mem;
useTIRViews = false;
useDummyExe = false;
@@ -51,7 +52,7 @@ FTNoIR_Protocol::~FTNoIR_Protocol()
{
qDebug()<< "~FTNoIR_Protocol: Destructor started.";
-
+
//
// Stop if started
//
@@ -60,8 +61,10 @@ FTNoIR_Protocol::~FTNoIR_Protocol()
viewsStop();
FTIRViewsLib.unload();
}
+ dummyTrackIR.terminate();
dummyTrackIR.kill();
- dummyTrackIR.waitForFinished(5);
+ dummyTrackIR.waitForFinished(50);
+
}
//
@@ -195,8 +198,11 @@ void FTNoIR_Protocol::start_tirviews() {
}
void FTNoIR_Protocol::start_dummy() {
+
+
QString program = QCoreApplication::applicationDirPath() + "/TrackIR.exe";
- dummyTrackIR.startDetached("\"" + program + "\"");
+ dummyTrackIR.setProgram("\"" + program + "\"");
+ dummyTrackIR.start();
qDebug() << "FTServer::run() says: TrackIR.exe executed!" << program;
}