From 8abb8a82c94ee6a703097a116a4aea45e07b079e Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Thu, 18 Jul 2013 16:50:02 +0200 Subject: Fix rest of Linux bitrot --- facetracknoir/tracker.cpp | 3 --- ftnoir_protocol_wine/ftnoir_protocol_wine.cpp | 6 +----- ftnoir_protocol_wine/ftnoir_protocol_wine.h | 2 -- ftnoir_protocol_wine/opentrack-wrapper-wine-windows.cxx | 3 ++- 4 files changed, 3 insertions(+), 11 deletions(-) diff --git a/facetracknoir/tracker.cpp b/facetracknoir/tracker.cpp index 1f9ac7dd..7eedfea1 100644 --- a/facetracknoir/tracker.cpp +++ b/facetracknoir/tracker.cpp @@ -166,9 +166,6 @@ void Tracker::run() { if (Libraries->pFilter) Libraries->pFilter->Initialize(); - - if (Libraries->pProtocol) - Libraries->pProtocol->Initialize(); } if (getTrackingActive()) { diff --git a/ftnoir_protocol_wine/ftnoir_protocol_wine.cpp b/ftnoir_protocol_wine/ftnoir_protocol_wine.cpp index 82dfb7b9..c6c038d9 100644 --- a/ftnoir_protocol_wine/ftnoir_protocol_wine.cpp +++ b/ftnoir_protocol_wine/ftnoir_protocol_wine.cpp @@ -47,6 +47,7 @@ FTNoIR_Protocol::FTNoIR_Protocol() : lck_shm(WINE_SHM_NAME, WINE_MTX_NAME, sizeo shm = (WineSHM*) lck_shm.mem; memset(shm, 0, sizeof(*shm)); } + wrapper.start("wine", QStringList() << (QCoreApplication::applicationDirPath() + "/opentrack-wrapper-wine.exe.so")); } /** destructor **/ @@ -60,11 +61,6 @@ FTNoIR_Protocol::~FTNoIR_Protocol() shm_unlink("/" WINE_SHM_NAME); } -void FTNoIR_Protocol::Initialize() -{ - wrapper.start("wine", QStringList() << (QCoreApplication::applicationDirPath() + "/opentrack-wrapper-wine.exe.so")); -} - void FTNoIR_Protocol::sendHeadposeToGame( double *headpose, double *rawheadpose ) { if (shm) { diff --git a/ftnoir_protocol_wine/ftnoir_protocol_wine.h b/ftnoir_protocol_wine/ftnoir_protocol_wine.h index 7c07323d..c4837992 100644 --- a/ftnoir_protocol_wine/ftnoir_protocol_wine.h +++ b/ftnoir_protocol_wine/ftnoir_protocol_wine.h @@ -50,8 +50,6 @@ public: FTNoIR_Protocol(); ~FTNoIR_Protocol(); - void Initialize(); - bool checkServerInstallationOK(); void sendHeadposeToGame(double* headpose, double* rawheadpose ); diff --git a/ftnoir_protocol_wine/opentrack-wrapper-wine-windows.cxx b/ftnoir_protocol_wine/opentrack-wrapper-wine-windows.cxx index 86ba4a41..6d5484a9 100644 --- a/ftnoir_protocol_wine/opentrack-wrapper-wine-windows.cxx +++ b/ftnoir_protocol_wine/opentrack-wrapper-wine-windows.cxx @@ -10,7 +10,7 @@ void create_registry_key(void) { char dir[8192]; - if (GetCurrentDirectoryA(8192, dir) < 8192) + if (GetCurrentDirectoryA(8192, dir) < 8190) { HKEY hkpath; if (RegCreateKeyExA(HKEY_CURRENT_USER, @@ -26,6 +26,7 @@ void create_registry_key(void) { for (int i = 0; dir[i]; i++) if (dir[i] == '\\') dir[i] = '/'; + strcat(dir, "/"); (void) RegSetValueExA(hkpath, "Path", 0, REG_SZ, (BYTE*) dir, strlen(dir) + 1); RegCloseKey(hkpath); } -- cgit v1.2.3