From 2fdbee9e9228a77b0f870a2245cfac33bc41aeba Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Tue, 2 Apr 2013 20:53:51 +0200 Subject: Everything works now --- ftnoir_protocol_ft/ftnoir_protocol_ft.cpp | 12 ++++++------ ftnoir_protocol_ft/ftnoir_protocol_ft.h | 6 +++--- 2 files changed, 9 insertions(+), 9 deletions(-) (limited to 'ftnoir_protocol_ft') diff --git a/ftnoir_protocol_ft/ftnoir_protocol_ft.cpp b/ftnoir_protocol_ft/ftnoir_protocol_ft.cpp index 5616915a..b1c53b8f 100644 --- a/ftnoir_protocol_ft/ftnoir_protocol_ft.cpp +++ b/ftnoir_protocol_ft/ftnoir_protocol_ft.cpp @@ -313,7 +313,7 @@ PDWORD_PTR MsgResult = 0; // Returns 'true' if all seems OK. // // -bool FTNoIR_Protocol::checkServerInstallationOK( HANDLE handle ) +bool FTNoIR_Protocol::checkServerInstallationOK() { QSettings settings("Freetrack", "FreetrackClient"); // Registry settings (in HK_USER) QSettings settingsTIR("NaturalPoint", "NATURALPOINT\\NPClient Location"); // Registry settings (in HK_USER) @@ -392,7 +392,7 @@ bool FTNoIR_Protocol::checkServerInstallationOK( HANDLE handle ) } catch(...) { settings.~QSettings(); } - return FTCreateMapping( handle ); + return FTCreateMapping(); } // @@ -400,7 +400,7 @@ bool FTNoIR_Protocol::checkServerInstallationOK( HANDLE handle ) // It contains the tracking data, a handle to the main-window and the program-name of the Game! // // -bool FTNoIR_Protocol::FTCreateMapping( HANDLE handle ) +bool FTNoIR_Protocol::FTCreateMapping() { bool bFirst = false; @@ -442,8 +442,8 @@ bool bFirst = false; if (bFirst) { memset(pMemData, 0, sizeof(FTMemMap)); // Write zero's, if first... } - pMemData->handle = handle; // The game uses the handle, to send a message that the Program-Name was set! - hMainWindow = handle; + pMemData->handle = 0; // The game uses the handle, to send a message that the Program-Name was set! + hMainWindow = 0; } hFTMutex = CreateMutexA(NULL, false, FREETRACK_MUTEX); } @@ -509,5 +509,5 @@ void FTNoIR_Protocol::getNameFromGame( char *dest ) extern "C" FTNOIR_PROTOCOL_BASE_EXPORT void* CALLING_CONVENTION GetConstructor() { - return (IProtocol*) new FTNoIR_ProtocolDll; + return (IProtocol*) new FTNoIR_Protocol; } diff --git a/ftnoir_protocol_ft/ftnoir_protocol_ft.h b/ftnoir_protocol_ft/ftnoir_protocol_ft.h index 5b36ab5a..ca6be189 100644 --- a/ftnoir_protocol_ft/ftnoir_protocol_ft.h +++ b/ftnoir_protocol_ft/ftnoir_protocol_ft.h @@ -54,12 +54,12 @@ public: void Release(); void Initialize(); - bool checkServerInstallationOK( HANDLE handle ); + bool checkServerInstallationOK( ); void sendHeadposeToGame( THeadPoseData *headpose, THeadPoseData *rawheadpose ); void getNameFromGame( char *dest ); // Take care dest can handle up to 100 chars... private: - bool FTCreateMapping(HANDLE handle); + bool FTCreateMapping(); void FTDestroyMapping(); importTIRViewsStart viewsStart; // Functions inside TIRViews.dll @@ -136,7 +136,7 @@ public: void getShortName(QString *strToBeFilled) { *strToBeFilled = QString("FreeTrack 2.0"); }; void getDescription(QString *strToBeFilled) { *strToBeFilled = QString("Enhanced FreeTrack protocol"); }; - void getIcon(QIcon *icon) { *icon = QIcon(":/images/Freetrack.ico"); }; + void getIcon(QIcon *icon) { *icon = QIcon(":/images/freetrack.png"); }; }; -- cgit v1.2.3