summaryrefslogtreecommitdiffhomepage
path: root/proto-sc
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2016-11-04 19:15:54 +0100
committerStanislaw Halik <sthalik@misaki.pl>2016-11-04 19:48:11 +0100
commitb89699c7551f768bf4ff47820543f8c7b8c794af (patch)
treec3a21ec23a40250ec54b97fe17b9035a932cfaf8 /proto-sc
parent068e0c7d432ede0a388fe1478b5146fcf1809315 (diff)
modules: make names unique
Diffstat (limited to 'proto-sc')
-rw-r--r--proto-sc/ftnoir_protocol_sc.cpp28
-rw-r--r--proto-sc/ftnoir_protocol_sc.h8
2 files changed, 18 insertions, 18 deletions
diff --git a/proto-sc/ftnoir_protocol_sc.cpp b/proto-sc/ftnoir_protocol_sc.cpp
index cea064ea..d60ab3fe 100644
--- a/proto-sc/ftnoir_protocol_sc.cpp
+++ b/proto-sc/ftnoir_protocol_sc.cpp
@@ -13,17 +13,17 @@
#include "api/plugin-api.hpp"
#include "opentrack-library-path.h"
-FTNoIR_Protocol::FTNoIR_Protocol() : should_stop(false), hSimConnect(nullptr)
+simconnect::simconnect() : should_stop(false), hSimConnect(nullptr)
{
}
-FTNoIR_Protocol::~FTNoIR_Protocol()
+simconnect::~simconnect()
{
should_stop = true;
wait();
}
-void FTNoIR_Protocol::run()
+void simconnect::run()
{
HANDLE event = CreateEvent(NULL, FALSE, FALSE, nullptr);
@@ -58,7 +58,7 @@ void FTNoIR_Protocol::run()
CloseHandle(event);
}
-void FTNoIR_Protocol::pose( const double *headpose ) {
+void simconnect::pose( const double *headpose ) {
// euler degrees
virtSCRotX = float(-headpose[Pitch]);
virtSCRotY = float(headpose[Yaw]);
@@ -120,7 +120,7 @@ private:
bool ok;
};
-bool FTNoIR_Protocol::correct()
+bool simconnect::correct()
{
if (!SCClientLib.isLoaded())
{
@@ -140,29 +140,29 @@ bool FTNoIR_Protocol::correct()
simconnect_open = (importSimConnect_Open) SCClientLib.resolve("SimConnect_Open");
if (simconnect_open == NULL) {
- qDebug() << "FTNoIR_Protocol::correct() says: SimConnect_Open function not found in DLL!";
+ qDebug() << "simconnect::correct() says: SimConnect_Open function not found in DLL!";
return false;
}
simconnect_set6DOF = (importSimConnect_CameraSetRelative6DOF) SCClientLib.resolve("SimConnect_CameraSetRelative6DOF");
if (simconnect_set6DOF == NULL) {
- qDebug() << "FTNoIR_Protocol::correct() says: SimConnect_CameraSetRelative6DOF function not found in DLL!";
+ qDebug() << "simconnect::correct() says: SimConnect_CameraSetRelative6DOF function not found in DLL!";
return false;
}
simconnect_close = (importSimConnect_Close) SCClientLib.resolve("SimConnect_Close");
if (simconnect_close == NULL) {
- qDebug() << "FTNoIR_Protocol::correct() says: SimConnect_Close function not found in DLL!";
+ qDebug() << "simconnect::correct() says: SimConnect_Close function not found in DLL!";
return false;
}
simconnect_calldispatch = (importSimConnect_CallDispatch) SCClientLib.resolve("SimConnect_CallDispatch");
if (simconnect_calldispatch == NULL) {
- qDebug() << "FTNoIR_Protocol::correct() says: SimConnect_CallDispatch function not found in DLL!";
+ qDebug() << "simconnect::correct() says: SimConnect_CallDispatch function not found in DLL!";
return false;
}
simconnect_subscribetosystemevent = (importSimConnect_SubscribeToSystemEvent) SCClientLib.resolve("SimConnect_SubscribeToSystemEvent");
if (simconnect_subscribetosystemevent == NULL) {
- qDebug() << "FTNoIR_Protocol::correct() says: SimConnect_SubscribeToSystemEvent function not found in DLL!";
+ qDebug() << "simconnect::correct() says: SimConnect_SubscribeToSystemEvent function not found in DLL!";
return false;
}
@@ -171,14 +171,14 @@ bool FTNoIR_Protocol::correct()
return true;
}
-void FTNoIR_Protocol::handle()
+void simconnect::handle()
{
(void) simconnect_set6DOF(hSimConnect, virtSCPosX, virtSCPosY, virtSCPosZ, virtSCRotX, virtSCRotZ, virtSCRotY);
}
-void CALLBACK FTNoIR_Protocol::processNextSimconnectEvent(SIMCONNECT_RECV* pData, DWORD, void *self_)
+void CALLBACK simconnect::processNextSimconnectEvent(SIMCONNECT_RECV* pData, DWORD, void *self_)
{
- FTNoIR_Protocol& self = *reinterpret_cast<FTNoIR_Protocol*>(self_);
+ simconnect& self = *reinterpret_cast<simconnect*>(self_);
switch(pData->dwID)
{
@@ -190,4 +190,4 @@ void CALLBACK FTNoIR_Protocol::processNextSimconnectEvent(SIMCONNECT_RECV* pData
}
}
-OPENTRACK_DECLARE_PROTOCOL(FTNoIR_Protocol, SCControls, FTNoIR_ProtocolDll)
+OPENTRACK_DECLARE_PROTOCOL(simconnect, SCControls, simconnectDll)
diff --git a/proto-sc/ftnoir_protocol_sc.h b/proto-sc/ftnoir_protocol_sc.h
index 1b3f5eb8..5f8717f4 100644
--- a/proto-sc/ftnoir_protocol_sc.h
+++ b/proto-sc/ftnoir_protocol_sc.h
@@ -32,11 +32,11 @@ struct settings : opts {
{}
};
-class FTNoIR_Protocol : public IProtocol, private QThread
+class simconnect : public IProtocol, private QThread
{
public:
- FTNoIR_Protocol();
- ~FTNoIR_Protocol() override;
+ simconnect();
+ ~simconnect() override;
bool correct();
void pose(const double* headpose);
void handle();
@@ -100,7 +100,7 @@ private slots:
void doCancel();
};
-class FTNoIR_ProtocolDll : public Metadata
+class simconnectDll : public Metadata
{
public:
QString name() { return QString("Microsoft FSX SimConnect"); }