From 94c0368c1a008d089ab780ffcea4f8aa24a0ee35 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Sat, 14 Sep 2013 23:46:24 +0200 Subject: Unbreak Windows build --- facetracknoir/facetracknoir.h | 1 + freetrackclient/freetrackclient.cpp | 18 +++++++----------- 2 files changed, 8 insertions(+), 11 deletions(-) diff --git a/facetracknoir/facetracknoir.h b/facetracknoir/facetracknoir.h index 8f83a851..b4ea2912 100644 --- a/facetracknoir/facetracknoir.h +++ b/facetracknoir/facetracknoir.h @@ -62,6 +62,7 @@ #include "global-settings.h" #include "tracker.h" #include "facetracknoir/curve-config.h" +#include "facetracknoir/shortcuts.h" class Tracker; // pre-define class to avoid circular includes class FaceTrackNoIR; diff --git a/freetrackclient/freetrackclient.cpp b/freetrackclient/freetrackclient.cpp index 52aa6190..0f8ced65 100644 --- a/freetrackclient/freetrackclient.cpp +++ b/freetrackclient/freetrackclient.cpp @@ -34,7 +34,7 @@ #include #include -#include "ftnoir_protocol_ft\fttypes.h" +#include "ftnoir_protocol_ft/fttypes.h" // // Functions to create/open the file-mapping @@ -58,8 +58,8 @@ static FILE *debug_stream = fopen("c:\\FreeTrackClient.log", "a"); static HANDLE hFTMemMap = 0; static FTMemMap *pMemData = 0; static HANDLE hFTMutex = 0; -static char* dllVersion = "1.0.0.0"; -static char* dllProvider = "FreeTrack"; +static const char* dllVersion = "1.0.0.0"; +static const char* dllProvider = "FreeTrack"; static unsigned short gameid = 0; @@ -92,13 +92,13 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) /****************************************************************** * FTGetData (FreeTrackClient.1) */ + #pragma comment(linker, "/export:FTGetData@4=FTGetData") FT_EXPORT(bool) FTGetData(PFreetrackData data) { - static int frame = 0; static int prevDataID = 0; static int dlyTrackingOff = 0; - static int tracking = 0; + // dbg_report("NP_GetData called."); if (FTCreateMapping() == false) return false; @@ -117,7 +117,6 @@ FT_EXPORT(bool) FTGetData(PFreetrackData data) dlyTrackingOff++; if (dlyTrackingOff > 20) { dlyTrackingOff = 100; - tracking = false; } } prevDataID = pMemData->data.DataID; @@ -161,7 +160,7 @@ FT_EXPORT(void) FTReportName( int name ) * FTGetDllVersion (FreeTrackClient.3) */ #pragma comment(linker, "/export:FTGetDllVersion@0=FTGetDllVersion") -extern "C" __declspec( dllexport ) char* FTGetDllVersion(void) +extern "C" __declspec( dllexport ) const char* FTGetDllVersion(void) { dbg_report("FTGetDllVersion request.\n"); @@ -172,7 +171,7 @@ extern "C" __declspec( dllexport ) char* FTGetDllVersion(void) * FTProvider (FreeTrackClient.4) */ #pragma comment(linker, "/export:FTProvider@0=FTProvider") -extern "C" __declspec( dllexport ) char* FTProvider(void) +extern "C" __declspec( dllexport ) const char* FTProvider(void) { dbg_report("FTProvider request.\n"); @@ -186,8 +185,6 @@ extern "C" __declspec( dllexport ) char* FTProvider(void) // bool FTCreateMapping() { - bool bMappingExists = false; - // // Memory-mapping already exists! // @@ -211,7 +208,6 @@ bool FTCreateMapping() if ( ( hFTMemMap != 0 ) && ( GetLastError() == ERROR_ALREADY_EXISTS ) ) { dbg_report("FTCreateMapping: Mapping already exists.\n"); - bMappingExists = true; // So the server was (probably) already started! CloseHandle( hFTMemMap ); hFTMemMap = 0; } -- cgit v1.2.3