summaryrefslogtreecommitdiffhomepage
path: root/FaceTrackNoIR/tracker.cpp
diff options
context:
space:
mode:
authorWim Vriend <facetracknoir@gmail.com>2011-04-04 19:58:09 +0000
committerWim Vriend <facetracknoir@gmail.com>2011-04-04 19:58:09 +0000
commitd3456cb84b428b2f5070517d6e571f6b2724dd24 (patch)
treeb4885f52965952f8a4a529bce3edadc6dc425867 /FaceTrackNoIR/tracker.cpp
parent28c091a886e6c98f41d3f5f8b153768b4a589fcd (diff)
Move protocols to DLL: TrackIR
git-svn-id: svn+ssh://svn.code.sf.net/p/facetracknoir/code@61 19e81ba0-9b1a-49c3-bd6c-561e1906d5fb
Diffstat (limited to 'FaceTrackNoIR/tracker.cpp')
-rw-r--r--FaceTrackNoIR/tracker.cpp25
1 files changed, 22 insertions, 3 deletions
diff --git a/FaceTrackNoIR/tracker.cpp b/FaceTrackNoIR/tracker.cpp
index cb881201..46b26237 100644
--- a/FaceTrackNoIR/tracker.cpp
+++ b/FaceTrackNoIR/tracker.cpp
@@ -188,8 +188,7 @@ QFrame *video_frame;
case FLIGHTGEAR:
server_Game = QSharedPointer<FTServer>(new FTServer ( )); // Create Free-track protocol-server
-// server_Game = QSharedPointer<FGServer>(new FGServer ( this )); // Create FlightGear protocol-server
-// server_Game = NULL;
+
//
// Load the DLL with the protocol-logic and retrieve a pointer to the Protocol-class.
//
@@ -220,7 +219,27 @@ QFrame *video_frame;
break;
case TRACKIR:
- server_Game = QSharedPointer<FTIRServer>(new FTIRServer ( )); // Create Fake-TIR protocol-server
+ server_Game = QSharedPointer<FTServer>(new FTServer ( )); // Create Free-track protocol-server
+
+ //
+ // Load the DLL with the protocol-logic and retrieve a pointer to the Protocol-class.
+ //
+ protocolLib = new QLibrary("FTNoIR_Protocol_FTIR.dll");
+
+ getProtocol = (importGetProtocol) protocolLib->resolve("GetProtocol");
+ if (getProtocol) {
+ IProtocolPtr ptrXyz(getProtocol());
+ if (ptrXyz)
+ {
+ pProtocol = ptrXyz;
+ pProtocol->Initialize();
+ qDebug() << "Protocol::setup Function Resolved!";
+ }
+ }
+ else {
+ QMessageBox::warning(0,"FaceTrackNoIR Error", "Protocol-DLL not loaded",QMessageBox::Ok,QMessageBox::NoButton);
+ return;
+ }
break;
case SIMCONNECT: