summaryrefslogtreecommitdiffhomepage
path: root/ftnoir_protocol_sc
diff options
context:
space:
mode:
Diffstat (limited to 'ftnoir_protocol_sc')
-rw-r--r--ftnoir_protocol_sc/ftnoir_protocol_sc.cpp8
-rw-r--r--ftnoir_protocol_sc/ftnoir_protocol_sc.h2
2 files changed, 2 insertions, 8 deletions
diff --git a/ftnoir_protocol_sc/ftnoir_protocol_sc.cpp b/ftnoir_protocol_sc/ftnoir_protocol_sc.cpp
index 8e35248e..02ad497d 100644
--- a/ftnoir_protocol_sc/ftnoir_protocol_sc.cpp
+++ b/ftnoir_protocol_sc/ftnoir_protocol_sc.cpp
@@ -31,9 +31,8 @@
static QLibrary SCClientLib;
-FTNoIR_Protocol::FTNoIR_Protocol() : should_stop(false), hSimConnect(nullptr), should_start(false)
+FTNoIR_Protocol::FTNoIR_Protocol() : should_stop(false), hSimConnect(nullptr)
{
- start();
}
FTNoIR_Protocol::~FTNoIR_Protocol()
@@ -44,9 +43,6 @@ FTNoIR_Protocol::~FTNoIR_Protocol()
void FTNoIR_Protocol::run()
{
- if (!should_start)
- return;
-
if (SUCCEEDED(simconnect_open(&hSimConnect, "FaceTrackNoIR", NULL, 0, 0, 0))) {
simconnect_subscribetosystemevent(hSimConnect, EVENT_PING, "Frame");
@@ -185,7 +181,7 @@ bool FTNoIR_Protocol::correct()
qDebug() << "FTNoIR_Protocol::correct() says: SimConnect functions resolved in DLL!";
- should_start = true;
+ start();
return true;
}
diff --git a/ftnoir_protocol_sc/ftnoir_protocol_sc.h b/ftnoir_protocol_sc/ftnoir_protocol_sc.h
index 3ced16e5..b65bac85 100644
--- a/ftnoir_protocol_sc/ftnoir_protocol_sc.h
+++ b/ftnoir_protocol_sc/ftnoir_protocol_sc.h
@@ -126,8 +126,6 @@ private:
HANDLE hSimConnect; // Handle to SimConnect
static void CALLBACK processNextSimconnectEvent(SIMCONNECT_RECV* pData, DWORD cbData, void *pContext);
settings s;
-
- bool should_start;
};
class SCControls: public IProtocolDialog