From 5dbc97ebc29bdfe540cd44ab12997ad1310b1057 Mon Sep 17 00:00:00 2001 From: mm0zct Date: Sat, 19 Oct 2013 16:51:13 +0100 Subject: Fixed FT2.0 tracker to actually start and kill TrackIR.exe dummy correctly -mm0zct&shalik --- ftnoir_protocol_ft/ftnoir_protocol_ft.cpp | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'ftnoir_protocol_ft/ftnoir_protocol_ft.cpp') 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; } -- cgit v1.2.3