From c78eed3db6a74f802b93e7e17942bbac1b736ffa Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Sun, 27 Jul 2014 19:22:33 +0200 Subject: Finish rename for all platforms --- ftnoir_tracker_joystick/ftnoir_tracker_joystick.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ftnoir_tracker_joystick/ftnoir_tracker_joystick.cpp') diff --git a/ftnoir_tracker_joystick/ftnoir_tracker_joystick.cpp b/ftnoir_tracker_joystick/ftnoir_tracker_joystick.cpp index f9789dce..806ba91e 100644 --- a/ftnoir_tracker_joystick/ftnoir_tracker_joystick.cpp +++ b/ftnoir_tracker_joystick/ftnoir_tracker_joystick.cpp @@ -1,5 +1,5 @@ #include "ftnoir_tracker_joystick.h" -#include "facetracknoir/global-settings.h" +#include "facetracknoir/plugin-support.h" #undef NDEBUG #include -- cgit v1.2.3 From eb9af9a745933f1e816a963ce2497f92f352159f Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Tue, 9 Sep 2014 07:46:15 +0200 Subject: account for joy hot-unplug shenanigans and read failures --- .../ftnoir_tracker_joystick.cpp | 28 ++++++++++++++-------- 1 file changed, 18 insertions(+), 10 deletions(-) (limited to 'ftnoir_tracker_joystick/ftnoir_tracker_joystick.cpp') diff --git a/ftnoir_tracker_joystick/ftnoir_tracker_joystick.cpp b/ftnoir_tracker_joystick/ftnoir_tracker_joystick.cpp index 806ba91e..34ac0dca 100644 --- a/ftnoir_tracker_joystick/ftnoir_tracker_joystick.cpp +++ b/ftnoir_tracker_joystick/ftnoir_tracker_joystick.cpp @@ -161,18 +161,26 @@ void FTNoIR_Tracker::GetHeadPoseData(double *data) if( !g_pDI || !g_pJoystick) return; - auto hr = g_pJoystick->Poll(); - if( FAILED( hr )) - { - hr = g_pJoystick->Acquire(); - for (int i = 0; hr == DIERR_INPUTLOST && i < 200; i++) - hr = g_pJoystick->Acquire(); - if (hr != DI_OK) + bool ok = false; + + for (int i = 0; i < 100; i++) + { + if (!FAILED(g_pJoystick->Poll())) { - qDebug() << "joy read failure" << hr; - return; + ok = true; + break; } - } + if (g_pJoystick->Acquire() != DI_OK) + continue; + else + ok = true; + break; + } + + if (!ok) + return; + + HRESULT hr = 0; if( FAILED( hr = g_pJoystick->GetDeviceState( sizeof( js ), &js ) ) ) return; -- cgit v1.2.3 From 0e10668c887f7306e86d8015c9b8e295e2e75197 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Fri, 12 Sep 2014 04:18:59 +0200 Subject: Joystick makes even less sense at 3am Issue: #38 --- ftnoir_tracker_joystick/ftnoir_tracker_joystick.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'ftnoir_tracker_joystick/ftnoir_tracker_joystick.cpp') diff --git a/ftnoir_tracker_joystick/ftnoir_tracker_joystick.cpp b/ftnoir_tracker_joystick/ftnoir_tracker_joystick.cpp index 34ac0dca..195dd760 100644 --- a/ftnoir_tracker_joystick/ftnoir_tracker_joystick.cpp +++ b/ftnoir_tracker_joystick/ftnoir_tracker_joystick.cpp @@ -225,9 +225,9 @@ void FTNoIR_Tracker::GetHeadPoseData(double *data) auto mid = (min_[idx] + max_[idx]) / 2; auto val = values[idx] - mid; - auto max = (max_[idx] - min_[idx]) / 2; - auto min = (min_[idx] - max_[idx]) / -2; - data[i] = val * limits[i] / (double) (val >= 0 ? max : min); + auto max = (max_[idx] - mid) * 2; + auto min = (mid - min_[idx]) * 2; + data[i] = val * limits[i] / (double) (val > mid ? max : min); } } } -- cgit v1.2.3 From 5d2d9bc14c0b97a2f5d3f5be6e533966f5a4df39 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Fri, 12 Sep 2014 04:25:40 +0200 Subject: Don't cut ranges in half needlessly Issue: #38 --- ftnoir_tracker_joystick/ftnoir_tracker_joystick.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'ftnoir_tracker_joystick/ftnoir_tracker_joystick.cpp') diff --git a/ftnoir_tracker_joystick/ftnoir_tracker_joystick.cpp b/ftnoir_tracker_joystick/ftnoir_tracker_joystick.cpp index 195dd760..cbb4440e 100644 --- a/ftnoir_tracker_joystick/ftnoir_tracker_joystick.cpp +++ b/ftnoir_tracker_joystick/ftnoir_tracker_joystick.cpp @@ -225,8 +225,8 @@ void FTNoIR_Tracker::GetHeadPoseData(double *data) auto mid = (min_[idx] + max_[idx]) / 2; auto val = values[idx] - mid; - auto max = (max_[idx] - mid) * 2; - auto min = (mid - min_[idx]) * 2; + auto max = (max_[idx] - mid); + auto min = (mid - min_[idx]); data[i] = val * limits[i] / (double) (val > mid ? max : min); } } -- cgit v1.2.3 From 63cd64275512c50948ccc6894a2547c707e8fbe3 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Fri, 12 Sep 2014 07:46:02 +0200 Subject: mid axis range already subtracted, correct branch test Issue: #38 --- ftnoir_tracker_joystick/ftnoir_tracker_joystick.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ftnoir_tracker_joystick/ftnoir_tracker_joystick.cpp') diff --git a/ftnoir_tracker_joystick/ftnoir_tracker_joystick.cpp b/ftnoir_tracker_joystick/ftnoir_tracker_joystick.cpp index cbb4440e..a4f026de 100644 --- a/ftnoir_tracker_joystick/ftnoir_tracker_joystick.cpp +++ b/ftnoir_tracker_joystick/ftnoir_tracker_joystick.cpp @@ -227,7 +227,7 @@ void FTNoIR_Tracker::GetHeadPoseData(double *data) auto max = (max_[idx] - mid); auto min = (mid - min_[idx]); - data[i] = val * limits[i] / (double) (val > mid ? max : min); + data[i] = val * limits[i] / (double) (val > 0 ? max : min); } } } -- cgit v1.2.3 From aa7fe04754cad9c1277e9e19b570b8b69c7f5103 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Fri, 12 Sep 2014 08:26:15 +0200 Subject: Correct axis scale logic Issue: #38 --- ftnoir_tracker_joystick/ftnoir_tracker_joystick.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'ftnoir_tracker_joystick/ftnoir_tracker_joystick.cpp') diff --git a/ftnoir_tracker_joystick/ftnoir_tracker_joystick.cpp b/ftnoir_tracker_joystick/ftnoir_tracker_joystick.cpp index a4f026de..d3f5806b 100644 --- a/ftnoir_tracker_joystick/ftnoir_tracker_joystick.cpp +++ b/ftnoir_tracker_joystick/ftnoir_tracker_joystick.cpp @@ -2,6 +2,7 @@ #include "facetracknoir/plugin-support.h" #undef NDEBUG #include +#include FTNoIR_Tracker::FTNoIR_Tracker() : g_pDI(nullptr), @@ -225,9 +226,8 @@ void FTNoIR_Tracker::GetHeadPoseData(double *data) auto mid = (min_[idx] + max_[idx]) / 2; auto val = values[idx] - mid; - auto max = (max_[idx] - mid); - auto min = (mid - min_[idx]); - data[i] = val * limits[i] / (double) (val > 0 ? max : min); + int scale = val > 0 ? abs(max_[idx] - mid) : -abs(mid - min_[idx]); + data[i] = abs(val) * limits[i] / scale; } } } -- cgit v1.2.3 From 9e21f5ef4e0dc00452ff0b6a940edc2d51114ec3 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Sat, 13 Sep 2014 11:24:01 +0200 Subject: joy: Fix API misuse Issue: #38 --- ftnoir_tracker_joystick/ftnoir_tracker_joystick.cpp | 21 ++++++--------------- ftnoir_tracker_joystick/ftnoir_tracker_joystick.h | 2 +- 2 files changed, 7 insertions(+), 16 deletions(-) (limited to 'ftnoir_tracker_joystick/ftnoir_tracker_joystick.cpp') diff --git a/ftnoir_tracker_joystick/ftnoir_tracker_joystick.cpp b/ftnoir_tracker_joystick/ftnoir_tracker_joystick.cpp index d3f5806b..54573af6 100644 --- a/ftnoir_tracker_joystick/ftnoir_tracker_joystick.cpp +++ b/ftnoir_tracker_joystick/ftnoir_tracker_joystick.cpp @@ -3,6 +3,7 @@ #undef NDEBUG #include #include +#include FTNoIR_Tracker::FTNoIR_Tracker() : g_pDI(nullptr), @@ -10,8 +11,6 @@ FTNoIR_Tracker::FTNoIR_Tracker() : iter(-1), mtx(QMutex::Recursive) { - for (int i = 0; i < 6; i++) - min_[i] = max_[i] = 0; GUID bar = {0}; } @@ -51,8 +50,6 @@ static BOOL CALLBACK EnumObjectsCallback( const DIDEVICEOBJECTINSTANCE* pdidoi, { auto self = (FTNoIR_Tracker*) pContext; - // For axes that are returned, set the DIPROP_RANGE property for the - // enumerated axis in order to scale min/max values. if( pdidoi->dwType & DIDFT_AXIS ) { DIPROPRANGE diprg = {0}; @@ -60,15 +57,14 @@ static BOOL CALLBACK EnumObjectsCallback( const DIDEVICEOBJECTINSTANCE* pdidoi, diprg.diph.dwHeaderSize = sizeof( DIPROPHEADER ); diprg.diph.dwHow = DIPH_BYID; diprg.diph.dwObj = pdidoi->dwType; + diprg.lMax = 65535; + diprg.lMin = -65536; // Set the range for the axis - if( FAILED( self->g_pJoystick->GetProperty( DIPROP_RANGE, &diprg.diph ) ) ) + if( FAILED( self->g_pJoystick->SetProperty( DIPROP_RANGE, &diprg.diph ) ) ) return DIENUM_STOP; - self->min_[self->iter] = diprg.lMin; - self->max_[self->iter] = diprg.lMax; - qDebug() << "axis" << self->iter << diprg.lMin << diprg.lMax; self->iter++; } @@ -222,13 +218,8 @@ void FTNoIR_Tracker::GetHeadPoseData(double *data) { data[i] = 0; } - else { - auto mid = (min_[idx] + max_[idx]) / 2; - auto val = values[idx] - mid; - - int scale = val > 0 ? abs(max_[idx] - mid) : -abs(mid - min_[idx]); - data[i] = abs(val) * limits[i] / scale; - } + else + data[i] = values[i] * limits[i] / AXIS_MAX; } } diff --git a/ftnoir_tracker_joystick/ftnoir_tracker_joystick.h b/ftnoir_tracker_joystick/ftnoir_tracker_joystick.h index 2c1bc731..1135b609 100644 --- a/ftnoir_tracker_joystick/ftnoir_tracker_joystick.h +++ b/ftnoir_tracker_joystick/ftnoir_tracker_joystick.h @@ -61,12 +61,12 @@ public: void reload(); LPDIRECTINPUT8 g_pDI; LPDIRECTINPUTDEVICE8 g_pJoystick; - int min_[8], max_[8]; QMutex mtx; QFrame* frame; DIDEVICEINSTANCE def; int iter; // XXX bad style settings s; + static const constexpr int AXIS_MAX = 65535; }; class TrackerControls: public QWidget, public ITrackerDialog -- cgit v1.2.3 From 98e05692a5bf3a9fabc6b08c121afbe36efe030c Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Sat, 13 Sep 2014 12:12:46 +0200 Subject: useless headers --- ftnoir_tracker_joystick/ftnoir_tracker_joystick.cpp | 3 --- 1 file changed, 3 deletions(-) (limited to 'ftnoir_tracker_joystick/ftnoir_tracker_joystick.cpp') diff --git a/ftnoir_tracker_joystick/ftnoir_tracker_joystick.cpp b/ftnoir_tracker_joystick/ftnoir_tracker_joystick.cpp index 54573af6..2d65f273 100644 --- a/ftnoir_tracker_joystick/ftnoir_tracker_joystick.cpp +++ b/ftnoir_tracker_joystick/ftnoir_tracker_joystick.cpp @@ -1,9 +1,6 @@ #include "ftnoir_tracker_joystick.h" #include "facetracknoir/plugin-support.h" -#undef NDEBUG #include -#include -#include FTNoIR_Tracker::FTNoIR_Tracker() : g_pDI(nullptr), -- cgit v1.2.3 From 6c7e9930aaf50d69472113791bcf6d69ef556ce1 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Sat, 13 Sep 2014 12:13:25 +0200 Subject: fix braino --- ftnoir_tracker_joystick/ftnoir_tracker_joystick.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'ftnoir_tracker_joystick/ftnoir_tracker_joystick.cpp') diff --git a/ftnoir_tracker_joystick/ftnoir_tracker_joystick.cpp b/ftnoir_tracker_joystick/ftnoir_tracker_joystick.cpp index 2d65f273..bf596f51 100644 --- a/ftnoir_tracker_joystick/ftnoir_tracker_joystick.cpp +++ b/ftnoir_tracker_joystick/ftnoir_tracker_joystick.cpp @@ -54,8 +54,8 @@ static BOOL CALLBACK EnumObjectsCallback( const DIDEVICEOBJECTINSTANCE* pdidoi, diprg.diph.dwHeaderSize = sizeof( DIPROPHEADER ); diprg.diph.dwHow = DIPH_BYID; diprg.diph.dwObj = pdidoi->dwType; - diprg.lMax = 65535; - diprg.lMin = -65536; + diprg.lMax = AXIS_MAX; + diprg.lMin = -AXIS_MAX; // Set the range for the axis -- cgit v1.2.3 From d4dd9675276093817756187c04d89f10da2df02e Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Sat, 13 Sep 2014 14:09:08 +0200 Subject: nix comment cancer --- facetracknoir/curve-config.cpp | 5 --- facetracknoir/facetracknoir.cpp | 4 +- facetracknoir/facetracknoir.h | 24 ++++------- facetracknoir/plugin-support.cpp | 7 +--- facetracknoir/plugin-support.h | 1 + facetracknoir/rotation.h | 11 ++--- facetracknoir/shortcuts.cpp | 12 +----- facetracknoir/tracker.cpp | 2 +- facetracknoir/tracker_types.cpp | 4 +- ftnoir_csv/csv.cpp | 18 +------- ftnoir_csv/csv.h | 11 +---- .../ftnoir_protocol_wine_dialog.cpp | 16 -------- ftnoir_protocol_wine/ftnoir_protocol_wine_dll.cpp | 5 +-- .../ftnoir_tracker_joystick.cpp | 6 +-- ftnoir_tracker_rift/ftnoir_tracker_rift_dialog.cpp | 5 +-- qfunctionconfigurator/functionconfig.cpp | 48 ++-------------------- qfunctionconfigurator/functionconfig.h | 14 +------ qfunctionconfigurator/qfunctionconfigurator.cpp | 6 +-- qfunctionconfigurator/qfunctionconfigurator.h | 31 +++++--------- 19 files changed, 44 insertions(+), 186 deletions(-) (limited to 'ftnoir_tracker_joystick/ftnoir_tracker_joystick.cpp') diff --git a/facetracknoir/curve-config.cpp b/facetracknoir/curve-config.cpp index 2bff009a..ef63607d 100644 --- a/facetracknoir/curve-config.cpp +++ b/facetracknoir/curve-config.cpp @@ -11,7 +11,6 @@ CurveConfigurationDialog::CurveConfigurationDialog(FaceTrackNoIR *ftnoir, QWidge QPoint offsetpos(120, 30); this->move(parent->pos() + offsetpos); - // Connect Qt signals to member-functions connect(ui.buttonBox, SIGNAL(accepted()), this, SLOT(doOK())); connect(ui.buttonBox, SIGNAL(rejected()), this, SLOT(doCancel())); @@ -39,7 +38,6 @@ CurveConfigurationDialog::CurveConfigurationDialog(FaceTrackNoIR *ftnoir, QWidge tie_setting(mainApp->s.a_y.invert, ui.chkInvertY); tie_setting(mainApp->s.a_z.invert, ui.chkInvertZ); - // Load the settings from the current .INI-file loadSettings(); } @@ -54,9 +52,6 @@ void CurveConfigurationDialog::doCancel() { close(); } -// -// Load the current Settings from the currently 'active' INI-file. -// void CurveConfigurationDialog::loadSettings() { QFunctionConfigurator* configs[6] = { ui.txconfig, diff --git a/facetracknoir/facetracknoir.cpp b/facetracknoir/facetracknoir.cpp index d717b3be..8df368cd 100644 --- a/facetracknoir/facetracknoir.cpp +++ b/facetracknoir/facetracknoir.cpp @@ -26,7 +26,7 @@ #include "tracker.h" #include "curve-config.h" #include "opentrack-version.h" -#include +#include #if defined(_WIN32) # include @@ -185,7 +185,6 @@ void FaceTrackNoIR::GetCameraNameDX() { #if defined(_WIN32) ui.cameraName->setText("No video-capturing device was found in your system: check if it's connected!"); - // Create the System Device Enumerator. HRESULT hr; ICreateDevEnum *pSysDevEnum = NULL; hr = CoCreateInstance(CLSID_SystemDeviceEnum, NULL, CLSCTX_INPROC_SERVER, IID_ICreateDevEnum, (void **)&pSysDevEnum); @@ -197,7 +196,6 @@ void FaceTrackNoIR::GetCameraNameDX() { qDebug() << "GetWDM says: CoCreateInstance succeeded!"; - // Obtain a class enumerator for the video compressor category. IEnumMoniker *pEnumCat = NULL; hr = pSysDevEnum->CreateClassEnumerator(CLSID_VideoInputDeviceCategory, &pEnumCat, 0); diff --git a/facetracknoir/facetracknoir.h b/facetracknoir/facetracknoir.h index ca8084c2..1da2d6b8 100644 --- a/facetracknoir/facetracknoir.h +++ b/facetracknoir/facetracknoir.h @@ -22,24 +22,16 @@ * with this program; if not, see . * *********************************************************************************/ -#ifndef FaceTrackNoIR_H -#define FaceTrackNoIR_H +#pragma once #include #include -#include -#include -#include #include #include #include #include #include -#include -#include -#include #include -#include #if !defined(_WIN32) # include "qxt-mini/QxtGlobalShortcut" #else @@ -78,7 +70,7 @@ public: FaceTrackNoIR(QWidget *parent = 0); ~FaceTrackNoIR(); - QFrame *get_video_widget(); // Get a pointer to the video-widget, to use in the DLL + QFrame *get_video_widget(); Tracker *tracker; void bindKeyboardShortcuts(); DynamicLibrary* current_tracker1() { @@ -114,12 +106,12 @@ public slots: private: HeadPoseData pose; Ui::OpentrackUI ui; - QTimer timUpdateHeadPose; // Timer to display headpose + QTimer timUpdateHeadPose; - ITrackerDialog* pTrackerDialog; // Pointer to Tracker dialog instance (in DLL) - ITrackerDialog* pSecondTrackerDialog; // Pointer to the second Tracker dialog instance (in DLL) - IProtocolDialog* pProtocolDialog; // Pointer to Protocol dialog instance (in DLL) - IFilterDialog* pFilterDialog; // Pointer to Filter dialog instance (in DLL) + ITrackerDialog* pTrackerDialog; + ITrackerDialog* pSecondTrackerDialog; + IProtocolDialog* pProtocolDialog; + IFilterDialog* pFilterDialog; QWidget *_keyboard_shortcuts; QWidget *_curve_config; @@ -161,5 +153,3 @@ private slots: void startTracker(); void stopTracker(); }; - -#endif // FaceTrackNoIR_H diff --git a/facetracknoir/plugin-support.cpp b/facetracknoir/plugin-support.cpp index 5d810ed1..2e80c5e4 100644 --- a/facetracknoir/plugin-support.cpp +++ b/facetracknoir/plugin-support.cpp @@ -1,4 +1,5 @@ #include "plugin-support.h" +#include #if !(defined(_WIN32)) # include @@ -62,15 +63,9 @@ SelectedLibraries::SelectedLibraries(IDynamicLibraryProvider* mainApp) : pFilter = (IFilter*) ptr(); } - // Check if the Protocol-server files were installed OK. - // Some servers also create a memory-mapping, for Inter Process Communication. - // The handle of the MainWindow is sent to 'The Game', so it can send a message back. - if (pProtocol) if(!pProtocol->checkServerInstallationOK()) return; - - // retrieve pointers to the User Interface and the main Application if (pTracker) { pTracker->StartTracker( mainApp->get_video_widget() ); } diff --git a/facetracknoir/plugin-support.h b/facetracknoir/plugin-support.h index 1c63151a..931f0fa1 100644 --- a/facetracknoir/plugin-support.h +++ b/facetracknoir/plugin-support.h @@ -77,6 +77,7 @@ struct Metadata virtual void getIcon(QIcon *icon) = 0; }; +// merely to break a circular header dependency -sh class IDynamicLibraryProvider { public: virtual DynamicLibrary* current_tracker1() = 0; diff --git a/facetracknoir/rotation.h b/facetracknoir/rotation.h index 22f35abb..d40fb6cf 100644 --- a/facetracknoir/rotation.h +++ b/facetracknoir/rotation.h @@ -5,10 +5,9 @@ * copyright notice and this permission notice appear in all copies. */ -#ifndef ROTATION_H -#define ROTATION_H +#pragma once #include -// ---------------------------------------------------------------------------- + class RotationType { public: @@ -16,7 +15,7 @@ public: RotationType(double yaw, double pitch, double roll) { fromEuler(yaw, pitch, roll); } RotationType(double a, double b, double c, double d) : a(a),b(b),c(c),d(d) {} - RotationType inv(){ // inverse + RotationType inv(){ return RotationType(a,-b,-c, -d); } @@ -58,7 +57,3 @@ public: protected: double a,b,c,d; // quaternion coefficients }; - - - -#endif //ROTATION_H diff --git a/facetracknoir/shortcuts.cpp b/facetracknoir/shortcuts.cpp index 601bbcc6..758617ca 100644 --- a/facetracknoir/shortcuts.cpp +++ b/facetracknoir/shortcuts.cpp @@ -9,9 +9,8 @@ KeyboardShortcutDialog::KeyboardShortcutDialog( FaceTrackNoIR *ftnoir, QWidget * QPoint offsetpos(100, 100); this->move(parent->pos() + offsetpos); - mainApp = ftnoir; // Preserve a pointer to FTNoIR + mainApp = ftnoir; - // Connect Qt signals to member-functions connect(ui.buttonBox, SIGNAL(accepted()), this, SLOT(doOK())); connect(ui.buttonBox, SIGNAL(rejected()), this, SLOT(doCancel())); @@ -33,9 +32,6 @@ KeyboardShortcutDialog::KeyboardShortcutDialog( FaceTrackNoIR *ftnoir, QWidget * tie_setting(mainApp->s.dingp, ui.ding); } -// -// OK clicked on server-dialog -// void KeyboardShortcutDialog::doOK() { mainApp->b->save(); this->close(); @@ -112,16 +108,10 @@ static bool isKeyPressed( const Key *key, const BYTE *keystate ) { ctrl = ( (keystate[DIK_LCONTROL] & 0x80) || (keystate[DIK_RCONTROL] & 0x80) ); alt = ( (keystate[DIK_LALT] & 0x80) || (keystate[DIK_RALT] & 0x80) ); - // - // If one of the modifiers is needed and not pressed, return false. - // if (key->shift && !shift) return false; if (key->ctrl && !ctrl) return false; if (key->alt && !alt) return false; - // - // All is well! - // return true; } return false; diff --git a/facetracknoir/tracker.cpp b/facetracknoir/tracker.cpp index dfe9bc1d..01fd0b4c 100644 --- a/facetracknoir/tracker.cpp +++ b/facetracknoir/tracker.cpp @@ -160,7 +160,7 @@ void Tracker::run() { t_compensate(output_camera.axes, output_camera.axes, mainApp->s.tcomp_tz); if (Libraries->pProtocol) { - Libraries->pProtocol->sendHeadposeToGame( output_camera.axes ); // degrees & centimeters + Libraries->pProtocol->sendHeadposeToGame( output_camera.axes ); } } diff --git a/facetracknoir/tracker_types.cpp b/facetracknoir/tracker_types.cpp index dec4ff81..ba3ac552 100644 --- a/facetracknoir/tracker_types.cpp +++ b/facetracknoir/tracker_types.cpp @@ -20,8 +20,7 @@ T6DOF operator-(const T6DOF& A, const T6DOF& B) C.axes[TX] = A.axes[TX] - B.axes[TX]; C.axes[TY] = A.axes[TY] - B.axes[TY]; C.axes[TZ] = A.axes[TZ] - B.axes[TZ]; - //C.frame_number? - return C; + return C; } T6DOF operator+(const T6DOF& A, const T6DOF& B) @@ -39,6 +38,5 @@ T6DOF operator+(const T6DOF& A, const T6DOF& B) C.axes[TX] = A.axes[TX] + B.axes[TX]; C.axes[TY] = A.axes[TY] + B.axes[TY]; C.axes[TZ] = A.axes[TZ] + B.axes[TZ]; - //C.frame_number? return C; } diff --git a/ftnoir_csv/csv.cpp b/ftnoir_csv/csv.cpp index 66823d24..b59b5083 100644 --- a/ftnoir_csv/csv.cpp +++ b/ftnoir_csv/csv.cpp @@ -25,9 +25,9 @@ #define INSIDE_CSV #include "csv.h" #include -#include #include #include +#include CSV::CSV(QIODevice * device) { @@ -46,12 +46,10 @@ CSV::CSV(QString &string){ CSV::~CSV() { - //delete m_codec; } void CSV::setCodec(const char* codecName){ - //delete m_codec; m_codec = QTextCodec::codecForName(codecName); } @@ -59,7 +57,6 @@ QString CSV::readLine(){ QString line; if(m_string.isNull()){ - //READ DATA FROM DEVICE if(m_device && m_device->isReadable()){ QTextDecoder dec(m_codec); m_string = dec.toUnicode(m_device->readAll()); @@ -67,8 +64,6 @@ QString CSV::readLine(){ return QString(); } } - - //PARSE if((m_pos = m_rx.indexIn(m_string,m_pos)) != -1) { line = m_rx.cap(1); m_pos += m_rx.matchedLength(); @@ -111,12 +106,9 @@ void CSV::getGameData( const int id, unsigned char* table, QString& gamename) QStringList gameLine; qDebug() << "getGameData, ID = " << gameID; - // - // Open the supported games list, to get the Name. - // QFile file(QCoreApplication::applicationDirPath() + "/settings/facetracknoir supported games.csv"); if (!file.open(QIODevice::ReadOnly | QIODevice::Text)){ - return; + return; } CSV csv(&file); gameLine = csv.parseLine(); @@ -131,9 +123,6 @@ void CSV::getGameData( const int id, unsigned char* table, QString& gamename) //qDebug() << "Column 6: " << gameLine.at(6); // International ID //qDebug() << "Column 7: " << gameLine.at(7); // FaceTrackNoIR ID - // - // If the gameID was found, fill the shared memory - // if (gameLine.count() > 6) { if (gameLine.at(6).compare( gameID, Qt::CaseInsensitive ) == 0) { QByteArray id = gameLine.at(7).toLatin1(); @@ -172,9 +161,6 @@ void CSV::getGameData( const int id, unsigned char* table, QString& gamename) gameLine = csv.parseLine(); } - // - // If the gameID was NOT found, fill only the name "Unknown game connected" - // qDebug() << "Unknown game connected" << gameID; file.close(); } diff --git a/ftnoir_csv/csv.h b/ftnoir_csv/csv.h index bfbece58..79e1351e 100644 --- a/ftnoir_csv/csv.h +++ b/ftnoir_csv/csv.h @@ -1,11 +1,4 @@ -/*dummy CSV reader for QT4*/ -/*version 0.1*/ -/*11.1.2009*/ -#ifndef CSV_H -#define CSV_H - -//#include "myclass_api.h" - +#pragma once #include #include #include @@ -41,5 +34,3 @@ private: CSV(QIODevice * device); CSV(QString &string); }; - -#endif // CSV_H diff --git a/ftnoir_protocol_wine/ftnoir_protocol_wine_dialog.cpp b/ftnoir_protocol_wine/ftnoir_protocol_wine_dialog.cpp index 29d46219..a6fae479 100644 --- a/ftnoir_protocol_wine/ftnoir_protocol_wine_dialog.cpp +++ b/ftnoir_protocol_wine/ftnoir_protocol_wine_dialog.cpp @@ -2,13 +2,6 @@ #include #include "facetracknoir/plugin-support.h" -//******************************************************************************************************* -// FaceTrackNoIR Client Settings-dialog. -//******************************************************************************************************* - -// -// Constructor for server-settings-dialog -// FTControls::FTControls() : QWidget() { ui.setupUi( this ); @@ -16,19 +9,10 @@ FTControls::FTControls() : QWidget() connect(ui.btnCancel, SIGNAL(clicked()), this, SLOT(doCancel())); } -// -// Destructor for server-dialog - -// -// OK clicked on server-dialog -// void FTControls::doOK() { this->close(); } -// -// Cancel clicked on server-dialog -// void FTControls::doCancel() { this->close(); } diff --git a/ftnoir_protocol_wine/ftnoir_protocol_wine_dll.cpp b/ftnoir_protocol_wine/ftnoir_protocol_wine_dll.cpp index 7bab1651..7d7fb247 100644 --- a/ftnoir_protocol_wine/ftnoir_protocol_wine_dll.cpp +++ b/ftnoir_protocol_wine/ftnoir_protocol_wine_dll.cpp @@ -1,13 +1,12 @@ #include "ftnoir_protocol_wine.h" -#include #include "facetracknoir/plugin-support.h" -FTNoIR_ProtocolDll::FTNoIR_ProtocolDll() { +FTNoIR_ProtocolDll::FTNoIR_ProtocolDll() +{ } FTNoIR_ProtocolDll::~FTNoIR_ProtocolDll() { - } extern "C" FTNOIR_PROTOCOL_BASE_EXPORT Metadata* CALLING_CONVENTION GetMetadata() diff --git a/ftnoir_tracker_joystick/ftnoir_tracker_joystick.cpp b/ftnoir_tracker_joystick/ftnoir_tracker_joystick.cpp index bf596f51..e1d92b78 100644 --- a/ftnoir_tracker_joystick/ftnoir_tracker_joystick.cpp +++ b/ftnoir_tracker_joystick/ftnoir_tracker_joystick.cpp @@ -54,10 +54,8 @@ static BOOL CALLBACK EnumObjectsCallback( const DIDEVICEOBJECTINSTANCE* pdidoi, diprg.diph.dwHeaderSize = sizeof( DIPROPHEADER ); diprg.diph.dwHow = DIPH_BYID; diprg.diph.dwObj = pdidoi->dwType; - diprg.lMax = AXIS_MAX; - diprg.lMin = -AXIS_MAX; - - // Set the range for the axis + diprg.lMax = FTNoIR_Tracker::AXIS_MAX; + diprg.lMin = -FTNoIR_Tracker::AXIS_MAX; if( FAILED( self->g_pJoystick->SetProperty( DIPROP_RANGE, &diprg.diph ) ) ) return DIENUM_STOP; diff --git a/ftnoir_tracker_rift/ftnoir_tracker_rift_dialog.cpp b/ftnoir_tracker_rift/ftnoir_tracker_rift_dialog.cpp index b7ec9784..cc8079bf 100644 --- a/ftnoir_tracker_rift/ftnoir_tracker_rift_dialog.cpp +++ b/ftnoir_tracker_rift/ftnoir_tracker_rift_dialog.cpp @@ -4,9 +4,8 @@ TrackerControls::TrackerControls() : QWidget() { - ui.setupUi( this ); + ui.setupUi( this ); - // Connect Qt signals to member-functions connect(ui.buttonBox, SIGNAL(accepted()), this, SLOT(doOK())); connect(ui.buttonBox, SIGNAL(rejected()), this, SLOT(doCancel())); @@ -34,7 +33,7 @@ void TrackerControls::doCancel() { close(); } -extern "C" FTNOIR_TRACKER_BASE_EXPORT ITrackerDialog* CALLING_CONVENTION GetDialog( ) +extern "C" FTNOIR_TRACKER_BASE_EXPORT ITrackerDialog* CALLING_CONVENTION GetDialog() { return new TrackerControls; } diff --git a/qfunctionconfigurator/functionconfig.cpp b/qfunctionconfigurator/functionconfig.cpp index 97a6db24..85d058fb 100644 --- a/qfunctionconfigurator/functionconfig.cpp +++ b/qfunctionconfigurator/functionconfig.cpp @@ -17,9 +17,6 @@ #include #include -// -// Constructor with List of Points in argument. -// FunctionConfig::FunctionConfig(QString title, int intMaxInput, int intMaxOutput) : _mutex(QMutex::Recursive) { @@ -29,9 +26,9 @@ FunctionConfig::FunctionConfig(QString title, int intMaxInput, int intMaxOutput) _size = 0; lastValueTracked = QPointF(0,0); _tracking_active = false; - _max_Input = intMaxInput; // Added WVR 20120805 + _max_Input = intMaxInput; _max_Output = intMaxOutput; - QSettings settings("opentrack"); // Registry settings (in HK_USER) + QSettings settings("opentrack"); QString currentFile = settings.value ( "SettingsFile", QCoreApplication::applicationDirPath() + "/settings/default.ini" ).toString(); QSettings iniFile( currentFile, QSettings::IniFormat ); loadSettings(iniFile); @@ -53,11 +50,6 @@ FunctionConfig::FunctionConfig() : { } -// -// Calculate the value of the function, given the input 'x'. -// Used to draw the curve and, most importantly, to translate input to output. -// The return-value is also stored internally, so the Widget can show the current value, when the Tracker is running. -// float FunctionConfig::getValue(float x) { QMutexLocker foo(&_mutex); int x2 = (int) (std::min(std::max(x, -360), 360) * MEMOIZE_PRECISION); @@ -67,9 +59,6 @@ float FunctionConfig::getValue(float x) { return ret; } -// -// The return-value is also stored internally, so the Widget can show the current value, when the Tracker is running. -// bool FunctionConfig::getLastPoint(QPointF& point ) { QMutexLocker foo(&_mutex); point = lastValueTracked; @@ -172,10 +161,6 @@ FunctionConfig::~FunctionConfig() { delete[] _data; } -// -// Remove a Point from the Function. -// Used by the Widget. -// void FunctionConfig::removePoint(int i) { QMutexLocker foo(&_mutex); if (i >= 0 && i < _points.size()) @@ -185,20 +170,12 @@ void FunctionConfig::removePoint(int i) { } } -// -// Add a Point to the Function. -// Used by the Widget and by loadSettings. -// void FunctionConfig::addPoint(QPointF pt) { QMutexLocker foo(&_mutex); _points.append(pt); reload(); } -// -// Move a Function Point. -// Used by the Widget. -// void FunctionConfig::movePoint(int idx, QPointF pt) { QMutexLocker foo(&_mutex); if (idx >= 0 && idx < _points.size()) @@ -208,10 +185,6 @@ void FunctionConfig::movePoint(int idx, QPointF pt) { } } -// -// Return the List of Points. -// Used by the Widget. -// QList FunctionConfig::getPoints() { QList ret; QMutexLocker foo(&_mutex); @@ -221,10 +194,6 @@ QList FunctionConfig::getPoints() { return ret; } -// -// Load the Points for the Function from the INI-file designated by settings. -// Settings for a specific Curve are loaded from their own Group in the INI-file. -// void FunctionConfig::loadSettings(QSettings& settings) { QMutexLocker foo(&_mutex); QPointF newPoint; @@ -235,12 +204,8 @@ void FunctionConfig::loadSettings(QSettings& settings) { int max = settings.value("point-count", 0).toInt(); for (int i = 0; i < max; i++) { - newPoint = QPointF(settings.value(QString("point-%1-x").arg(i), 0).toFloat(), - settings.value(QString("point-%1-y").arg(i), 0).toFloat()); - // - // Make sure the new Point fits in the Function Range. - // Maybe this can be improved? - // + newPoint = QPointF(settings.value(QString("point-%1-x").arg(i), 0).toFloat(), + settings.value(QString("point-%1-y").arg(i), 0).toFloat()); if (newPoint.x() > _max_Input) { newPoint.setX(_max_Input); } @@ -254,11 +219,6 @@ void FunctionConfig::loadSettings(QSettings& settings) { reload(); } -// -// Save the Points for the Function to the INI-file designated by settings. -// Settings for a specific Curve are saved in their own Group in the INI-file. -// The number of Points is also saved, to make loading more convenient. -// void FunctionConfig::saveSettings(QSettings& settings) { QMutexLocker foo(&_mutex); settings.beginGroup(QString("Curves-%1").arg(_title)); diff --git a/qfunctionconfigurator/functionconfig.h b/qfunctionconfigurator/functionconfig.h index 4d771dfd..9b43f0bd 100644 --- a/qfunctionconfigurator/functionconfig.h +++ b/qfunctionconfigurator/functionconfig.h @@ -26,7 +26,7 @@ private: int _size; QString _title; float getValueInternal(int x); - QPointF lastValueTracked; // The last input value requested by the Tracker, with it's output-value. + QPointF lastValueTracked; volatile bool _tracking_active; int _max_Input; int _max_Output; @@ -34,19 +34,12 @@ private: public: int maxInput() const { return _max_Input; } int maxOutput() const { return _max_Output; } - // - // Contructor(s) and destructor - // FunctionConfig(); FunctionConfig(QString title, int intMaxInput, int intMaxOutput); ~FunctionConfig(); float getValue(float x); - bool getLastPoint(QPointF& point); // Get the last Point that was requested. - - // - // Functions to manipulate the Function - // + bool getLastPoint(QPointF& point); void removePoint(int i); void removeAllPoints() { QMutexLocker foo(&_mutex); @@ -64,9 +57,6 @@ public: _max_Output = MaxOutput; } - // - // Functions to load/save the Function-Points to an INI-file - // void saveSettings(QSettings& settings); void loadSettings(QSettings& settings); diff --git a/qfunctionconfigurator/qfunctionconfigurator.cpp b/qfunctionconfigurator/qfunctionconfigurator.cpp index 55d1e1bc..e94eded4 100644 --- a/qfunctionconfigurator/qfunctionconfigurator.cpp +++ b/qfunctionconfigurator/qfunctionconfigurator.cpp @@ -28,7 +28,7 @@ static const int pointSize = 5; QFunctionConfigurator::QFunctionConfigurator(QWidget *parent) : QWidget(parent) { - movingPoint = -1; // Index of that same point + movingPoint = -1; _config = 0; _draw_background = true; _draw_function = true; @@ -37,9 +37,9 @@ QFunctionConfigurator::QFunctionConfigurator(QWidget *parent) } void QFunctionConfigurator::setConfig(FunctionConfig* config) { - QSettings settings("opentrack"); // Registry settings (in HK_USER) + QSettings settings("opentrack"); QString currentFile = settings.value ( "SettingsFile", QCoreApplication::applicationDirPath() + "/settings/default.ini" ).toString(); - QSettings iniFile( currentFile, QSettings::IniFormat ); // Application settings (in INI-file) + QSettings iniFile( currentFile, QSettings::IniFormat ); config->loadSettings(iniFile); _config = config; diff --git a/qfunctionconfigurator/qfunctionconfigurator.h b/qfunctionconfigurator/qfunctionconfigurator.h index 1f6b4f78..d3a8741f 100644 --- a/qfunctionconfigurator/qfunctionconfigurator.h +++ b/qfunctionconfigurator/qfunctionconfigurator.h @@ -4,8 +4,7 @@ * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission notice appear in all copies. */ -#ifndef QFUNCTIONCONFIGURATOR_H -#define QFUNCTIONCONFIGURATOR_H +#pragma once #include #include @@ -14,14 +13,6 @@ #include "qfunctionconfigurator/functionconfig.h" #include "ftnoir_tracker_base/ftnoir_tracker_base.h" -// -// The FunctionConfigurator Widget is used to display and configure a function (curve). -// The Function is used by FaceTrackNoIR to 'translate' the actual head-pose to the virtual headpose. Every axis is configured by a separate Function. -// -// The Function is coded in a separate Class and can exists, without the Widget. When the widget is displayed (therefore 'created'), the Function can be attached to the -// Widget and the Widget used to change the Function. -// - class FTNOIR_TRACKER_BASE_EXPORT QFunctionConfigurator : public QWidget { Q_OBJECT @@ -70,23 +61,21 @@ private: _draw_function = _draw_background = true; } - QRectF range; // The actual rectangle for the Bezier-curve - QPointF lastPoint; // The right-most point of the Function - QPointF pixel_coord_to_point (QPointF point) const; // Convert the graphical Point to a real-life Point - QPointF point_to_pixel (QPointF point) const; // Convert the Point to a graphical Point + QRectF range; + QPointF lastPoint; + QPointF pixel_coord_to_point (QPointF point) const; + QPointF point_to_pixel (QPointF point) const; int movingPoint; QElapsedTimer timer; QPointF c; - QColor colBezier; // Color of Bezier curve + QColor colBezier; - bool _draw_background; // Flag to determine if the background should be (re-)drawn on the QPixmap - QPixmap _background; // Image of the static parts (axis, lines, etc.) - bool _draw_function; // Flag to determine if the function should be (re-)drawn on the QPixmap - QPixmap _function; // Image of the function (static unless edited by the user) + bool _draw_background; + QPixmap _background; + bool _draw_function; + QPixmap _function; FunctionConfig* _config; }; - -#endif // QFUNCTIONCONFIGURATOR_H -- cgit v1.2.3 From fff539163e23c687ef32d61aa91c16b2e616ec63 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Wed, 17 Sep 2014 07:55:35 +0200 Subject: remove win32-joystick axis remap Feature provided for all trackers in core. Only confuses when both remaps used at the same time. Issue: #52 --- .../ftnoir_tracker_joystick.cpp | 21 +- ftnoir_tracker_joystick/ftnoir_tracker_joystick.h | 12 - .../ftnoir_tracker_joystick_controls.ui | 394 +-------------------- .../ftnoir_tracker_joystick_dialog.cpp | 7 - 4 files changed, 16 insertions(+), 418 deletions(-) (limited to 'ftnoir_tracker_joystick/ftnoir_tracker_joystick.cpp') diff --git a/ftnoir_tracker_joystick/ftnoir_tracker_joystick.cpp b/ftnoir_tracker_joystick/ftnoir_tracker_joystick.cpp index e1d92b78..0e95f57d 100644 --- a/ftnoir_tracker_joystick/ftnoir_tracker_joystick.cpp +++ b/ftnoir_tracker_joystick/ftnoir_tracker_joystick.cpp @@ -196,26 +196,9 @@ void FTNoIR_Tracker::GetHeadPoseData(double *data) 90, 180 }; - - int axes[] = { - s.axis_0, - s.axis_1, - s.axis_2, - s.axis_3, - s.axis_4, - s.axis_5 - }; - + for (int i = 0; i < 6; i++) - { - auto idx = axes[i] - 1; - if (idx < 0 || idx > 7) - { - data[i] = 0; - } - else - data[i] = values[i] * limits[i] / AXIS_MAX; - } + data[i] = values[i] * limits[i] / AXIS_MAX; } extern "C" FTNOIR_TRACKER_BASE_EXPORT ITracker* CALLING_CONVENTION GetConstructor() diff --git a/ftnoir_tracker_joystick/ftnoir_tracker_joystick.h b/ftnoir_tracker_joystick/ftnoir_tracker_joystick.h index 1135b609..75ea9f52 100644 --- a/ftnoir_tracker_joystick/ftnoir_tracker_joystick.h +++ b/ftnoir_tracker_joystick/ftnoir_tracker_joystick.h @@ -32,21 +32,9 @@ using namespace options; struct settings { pbundle b; - value axis_0; - value axis_1; - value axis_2; - value axis_3; - value axis_4; - value axis_5; value joyid; settings() : b(bundle("tracker-joystick")), - axis_0(b, "axis-0", 0), - axis_1(b, "axis-1", 0), - axis_2(b, "axis-2", 0), - axis_3(b, "axis-3", 0), - axis_4(b, "axis-4", 0), - axis_5(b, "axis-5", 0), joyid(b, "joy-id", "") {} }; diff --git a/ftnoir_tracker_joystick/ftnoir_tracker_joystick_controls.ui b/ftnoir_tracker_joystick/ftnoir_tracker_joystick_controls.ui index 5d349169..b0e010a1 100644 --- a/ftnoir_tracker_joystick/ftnoir_tracker_joystick_controls.ui +++ b/ftnoir_tracker_joystick/ftnoir_tracker_joystick_controls.ui @@ -9,8 +9,8 @@ 0 0 - 216 - 259 + 326 + 88 @@ -32,385 +32,25 @@ false - - - + + + + + Joystick + + + + + - + 0 0 - - - 0 - 85 - - - - Axis enablement - - - Qt::AlignCenter - - - - - - X - - - - - - - Y - - - - - - - Roll - - - - - - - - - - - - - #1 - - - - - #2 - - - - - #3 - - - - - #4 - - - - - #5 - - - - - #6 - - - - - #7 - - - - - #8 - - - - - - - - - - - - - - #1 - - - - - #2 - - - - - #3 - - - - - #4 - - - - - #5 - - - - - #6 - - - - - #7 - - - - - #8 - - - - - - - - - - - - - - #1 - - - - - #2 - - - - - #3 - - - - - #4 - - - - - #5 - - - - - #6 - - - - - #7 - - - - - #8 - - - - - - - - - - - - - - #1 - - - - - #2 - - - - - #3 - - - - - #4 - - - - - #5 - - - - - #6 - - - - - #7 - - - - - #8 - - - - - - - - - - - - - - #1 - - - - - #2 - - - - - #3 - - - - - #4 - - - - - #5 - - - - - #6 - - - - - #7 - - - - - #8 - - - - - - - - Yaw - - - - - - - - - - - - - #1 - - - - - #2 - - - - - #3 - - - - - #4 - - - - - #5 - - - - - #6 - - - - - #7 - - - - - #8 - - - - - - - - Z - - - - - - - Pitch - - - - - - - Joy Id - - - - - - - - 0 - 0 - - - - - - + QDialogButtonBox::Cancel|QDialogButtonBox::Ok @@ -421,12 +61,6 @@ joylist - comboBox - comboBox_2 - comboBox_3 - comboBox_4 - comboBox_5 - comboBox_6 buttonBox diff --git a/ftnoir_tracker_joystick/ftnoir_tracker_joystick_dialog.cpp b/ftnoir_tracker_joystick/ftnoir_tracker_joystick_dialog.cpp index 7f24a8f1..eea7f916 100644 --- a/ftnoir_tracker_joystick/ftnoir_tracker_joystick_dialog.cpp +++ b/ftnoir_tracker_joystick/ftnoir_tracker_joystick_dialog.cpp @@ -19,13 +19,6 @@ TrackerControls::TrackerControls() : tracker(nullptr) connect(ui.buttonBox, SIGNAL(accepted()), this, SLOT(doOK())); connect(ui.buttonBox, SIGNAL(rejected()), this, SLOT(doCancel())); - tie_setting(s.axis_0, ui.comboBox); - tie_setting(s.axis_1, ui.comboBox_2); - tie_setting(s.axis_2, ui.comboBox_3); - tie_setting(s.axis_3, ui.comboBox_4); - tie_setting(s.axis_4, ui.comboBox_5); - tie_setting(s.axis_5, ui.comboBox_6); - { auto hr = CoInitialize( nullptr ); LPDIRECTINPUT8 g_pDI = nullptr; -- cgit v1.2.3 From 05b5171229d840b8b120a1e5b765128973270584 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Thu, 18 Sep 2014 08:49:07 +0200 Subject: -Wall -Wextra, no functional changes --- ftnoir_protocol_sc/ftnoir_protocol_sc.cpp | 10 ++++------ ftnoir_protocol_sc/ftnoir_protocol_sc.h | 2 +- ftnoir_tracker_joystick/ftnoir_tracker_joystick.cpp | 5 ++--- ftnoir_tracker_pt/point_tracker.cpp | 20 ++++++++------------ 4 files changed, 15 insertions(+), 22 deletions(-) (limited to 'ftnoir_tracker_joystick/ftnoir_tracker_joystick.cpp') diff --git a/ftnoir_protocol_sc/ftnoir_protocol_sc.cpp b/ftnoir_protocol_sc/ftnoir_protocol_sc.cpp index c53aa49c..1baeacd4 100644 --- a/ftnoir_protocol_sc/ftnoir_protocol_sc.cpp +++ b/ftnoir_protocol_sc/ftnoir_protocol_sc.cpp @@ -79,13 +79,11 @@ void FTNoIR_Protocol::sendHeadposeToGame( const double *headpose ) { if (!blnSimConnectActive) { if (SUCCEEDED(simconnect_open(&hSimConnect, "FaceTrackNoIR", NULL, 0, 0, 0))) { - HRESULT hr; - simconnect_subscribetosystemevent(hSimConnect, EVENT_PING, "Frame"); - hr = simconnect_mapclienteventtosimevent(hSimConnect, EVENT_INIT, ""); - hr = simconnect_addclienteventtonotificationgroup(hSimConnect, GROUP0, EVENT_INIT, false); - hr = simconnect_setnotificationgrouppriority(hSimConnect, GROUP0, SIMCONNECT_GROUP_PRIORITY_HIGHEST); + simconnect_mapclienteventtosimevent(hSimConnect, EVENT_INIT, ""); + simconnect_addclienteventtonotificationgroup(hSimConnect, GROUP0, EVENT_INIT, false); + simconnect_setnotificationgrouppriority(hSimConnect, GROUP0, SIMCONNECT_GROUP_PRIORITY_HIGHEST); blnSimConnectActive = true; } } @@ -203,7 +201,7 @@ bool FTNoIR_Protocol::checkServerInstallationOK() return true; } -void CALLBACK FTNoIR_Protocol::processNextSimconnectEvent(SIMCONNECT_RECV* pData, DWORD cbData, void *pContext) +void CALLBACK FTNoIR_Protocol::processNextSimconnectEvent(SIMCONNECT_RECV* pData, DWORD, void *) { switch(pData->dwID) { diff --git a/ftnoir_protocol_sc/ftnoir_protocol_sc.h b/ftnoir_protocol_sc/ftnoir_protocol_sc.h index d6185428..c60f6d85 100644 --- a/ftnoir_protocol_sc/ftnoir_protocol_sc.h +++ b/ftnoir_protocol_sc/ftnoir_protocol_sc.h @@ -133,7 +133,7 @@ class SCControls: public QWidget, public IProtocolDialog Q_OBJECT public: SCControls(); - void registerProtocol(IProtocol *protocol) {} + void registerProtocol(IProtocol *) {} void unRegisterProtocol() {} private: Ui::UICSCControls ui; diff --git a/ftnoir_tracker_joystick/ftnoir_tracker_joystick.cpp b/ftnoir_tracker_joystick/ftnoir_tracker_joystick.cpp index 0e95f57d..63a3a8b5 100644 --- a/ftnoir_tracker_joystick/ftnoir_tracker_joystick.cpp +++ b/ftnoir_tracker_joystick/ftnoir_tracker_joystick.cpp @@ -5,10 +5,9 @@ FTNoIR_Tracker::FTNoIR_Tracker() : g_pDI(nullptr), g_pJoystick(nullptr), - iter(-1), - mtx(QMutex::Recursive) + mtx(QMutex::Recursive), + iter(-1) { - GUID bar = {0}; } void FTNoIR_Tracker::reload() diff --git a/ftnoir_tracker_pt/point_tracker.cpp b/ftnoir_tracker_pt/point_tracker.cpp index 5735c081..f83ff437 100644 --- a/ftnoir_tracker_pt/point_tracker.cpp +++ b/ftnoir_tracker_pt/point_tracker.cpp @@ -79,13 +79,9 @@ void PointModel::get_d_order(const std::vector& points, int d_order[] { // get sort indices with respect to d scalar product vector< pair > d_vals; - for (int i = 0; i(d.dot(points[i]), i)); - struct - { - bool operator()(const pair& a, const pair& b) { return a.first < b.first; } - } comp; std::sort(d_vals.begin(), d_vals.end(), #ifdef OPENTRACK_API @@ -95,19 +91,19 @@ void PointModel::get_d_order(const std::vector& points, int d_order[] #endif ); - for (int i = 0; i& points, float f, float dt) return false; } - int n_iter = POSIT(f); + (void) POSIT(f); //qDebug()<<"Number of POSIT iterations: "< Date: Mon, 22 Sep 2014 10:27:16 +0200 Subject: joy: nix debug --- ftnoir_tracker_joystick/ftnoir_tracker_joystick.cpp | 2 -- 1 file changed, 2 deletions(-) (limited to 'ftnoir_tracker_joystick/ftnoir_tracker_joystick.cpp') diff --git a/ftnoir_tracker_joystick/ftnoir_tracker_joystick.cpp b/ftnoir_tracker_joystick/ftnoir_tracker_joystick.cpp index 63a3a8b5..7df65709 100644 --- a/ftnoir_tracker_joystick/ftnoir_tracker_joystick.cpp +++ b/ftnoir_tracker_joystick/ftnoir_tracker_joystick.cpp @@ -129,8 +129,6 @@ void FTNoIR_Tracker::StartTracker(QFrame* frame) goto fail; } - qDebug() << "joy init success"; - return; fail: -- cgit v1.2.3 From 6f2a292bb7f84470354e5bc707a1f3eea9d824e3 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Mon, 22 Sep 2014 10:27:39 +0200 Subject: joy: nix spurious warning with -Wall -Wextra --- ftnoir_tracker_joystick/ftnoir_tracker_joystick.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'ftnoir_tracker_joystick/ftnoir_tracker_joystick.cpp') diff --git a/ftnoir_tracker_joystick/ftnoir_tracker_joystick.cpp b/ftnoir_tracker_joystick/ftnoir_tracker_joystick.cpp index 7df65709..90091e5d 100644 --- a/ftnoir_tracker_joystick/ftnoir_tracker_joystick.cpp +++ b/ftnoir_tracker_joystick/ftnoir_tracker_joystick.cpp @@ -41,6 +41,8 @@ FTNoIR_Tracker::~FTNoIR_Tracker() } } +#pragma GCC diagnostic ignored "-Wmissing-field-initializers" + static BOOL CALLBACK EnumObjectsCallback( const DIDEVICEOBJECTINSTANCE* pdidoi, VOID* pContext ) { -- cgit v1.2.3 From 32f89f4f96f92e58e73e48fb09491bdcaba1174f Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Mon, 22 Sep 2014 11:43:13 +0200 Subject: win32: all plugins in Windows binary distro updated to new api --- ftnoir_filter_accela/ftnoir_filter_accela.cpp | 2 +- ftnoir_filter_accela/ftnoir_filter_accela.h | 3 +-- ftnoir_filter_accela/ftnoir_filter_accela_dialog.cpp | 2 +- ftnoir_filter_accela/ftnoir_filter_accela_dll.cpp | 2 +- ftnoir_filter_ewma2/ftnoir_filter_ewma2.cpp | 2 +- ftnoir_filter_ewma2/ftnoir_filter_ewma2.h | 3 +-- ftnoir_filter_ewma2/ftnoir_filter_ewma2_dialog.cpp | 2 +- ftnoir_filter_ewma2/ftnoir_filter_ewma_dll.cpp | 2 +- ftnoir_filter_kalman/ftnoir_filter_kalman.h | 9 ++++----- ftnoir_filter_kalman/kalman.cpp | 6 +++--- ftnoir_protocol_fg/ftnoir_protocol_fg.cpp | 5 ++--- ftnoir_protocol_fg/ftnoir_protocol_fg.h | 3 +-- ftnoir_protocol_fg/ftnoir_protocol_fg_dialog.cpp | 2 +- ftnoir_protocol_fg/ftnoir_protocol_fg_dll.cpp | 2 +- ftnoir_protocol_fsuipc/ftnoir_protocol_fsuipc.cpp | 2 +- ftnoir_protocol_fsuipc/ftnoir_protocol_fsuipc.h | 3 +-- ftnoir_protocol_fsuipc/ftnoir_protocol_fsuipc_dialog.cpp | 2 +- ftnoir_protocol_fsuipc/ftnoir_protocol_fsuipc_dll.cpp | 2 +- ftnoir_protocol_ft/ftnoir_protocol_ft.cpp | 2 +- ftnoir_protocol_ft/ftnoir_protocol_ft.h | 3 +-- ftnoir_protocol_ft/ftnoir_protocol_ft_dialog.cpp | 2 +- ftnoir_protocol_ft/ftnoir_protocol_ft_dll.cpp | 2 +- ftnoir_protocol_ftn/ftnoir_protocol_ftn.cpp | 2 +- ftnoir_protocol_ftn/ftnoir_protocol_ftn.h | 4 +--- ftnoir_protocol_ftn/ftnoir_protocol_ftn_dialog.cpp | 2 +- ftnoir_protocol_ftn/ftnoir_protocol_ftn_dll.cpp | 2 +- ftnoir_protocol_libevdev/ftnoir_protocol_libevdev.cpp | 5 ++--- ftnoir_protocol_libevdev/ftnoir_protocol_libevdev.h | 3 +-- .../ftnoir_protocol_libevdev_dialog.cpp | 2 +- .../ftnoir_protocol_libevdev_dll.cpp | 2 +- ftnoir_protocol_mouse/ftnoir_protocol_mouse.cpp | 2 +- ftnoir_protocol_mouse/ftnoir_protocol_mouse.h | 3 +-- ftnoir_protocol_mouse/ftnoir_protocol_mouse_dialog.cpp | 2 +- ftnoir_protocol_mouse/ftnoir_protocol_mouse_dll.cpp | 2 +- ftnoir_protocol_sc/ftnoir_protocol_sc.cpp | 2 +- ftnoir_protocol_sc/ftnoir_protocol_sc.h | 5 ++--- ftnoir_protocol_sc/ftnoir_protocol_sc_dialog.cpp | 2 +- ftnoir_protocol_sc/ftnoir_protocol_sc_dll.cpp | 2 +- ftnoir_protocol_vjoy/ftnoir_protocol_vjoy.cpp | 5 ++--- ftnoir_protocol_vjoy/ftnoir_protocol_vjoy.h | 3 +-- ftnoir_protocol_vjoy/ftnoir_protocol_vjoy_dialog.cpp | 2 +- ftnoir_protocol_vjoy/ftnoir_protocol_vjoy_dll.cpp | 2 +- ftnoir_tracker_aruco/ftnoir_tracker_aruco.cpp | 9 ++++----- ftnoir_tracker_aruco/ftnoir_tracker_aruco.h | 2 +- ftnoir_tracker_aruco/ftnoir_tracker_aruco_dll.h | 3 +-- .../ftnoir_tracker_freepie-udp.cpp | 2 +- ftnoir_tracker_freepie-udp/ftnoir_tracker_freepie-udp.h | 3 +-- .../ftnoir_tracker_freepie-udp_dialog.cpp | 2 +- .../ftnoir_tracker_freepie-udp_dll.cpp | 2 +- ftnoir_tracker_ht/ftnoir_tracker_ht.cpp | 13 ++++--------- ftnoir_tracker_ht/ftnoir_tracker_ht.h | 2 +- ftnoir_tracker_ht/ftnoir_tracker_ht_dll.h | 3 +-- ftnoir_tracker_hydra/ftnoir_tracker_hydra.cpp | 3 ++- ftnoir_tracker_hydra/ftnoir_tracker_hydra.h | 3 +-- ftnoir_tracker_hydra/ftnoir_tracker_hydra_dialog.cpp | 2 +- ftnoir_tracker_hydra/ftnoir_tracker_hydra_dll.cpp | 2 +- ftnoir_tracker_joystick/ftnoir_tracker_joystick.cpp | 2 +- ftnoir_tracker_joystick/ftnoir_tracker_joystick.h | 3 +-- .../ftnoir_tracker_joystick_dialog.cpp | 2 +- ftnoir_tracker_joystick/ftnoir_tracker_joystick_dll.cpp | 2 +- ftnoir_tracker_pt/ftnoir_tracker_pt.cpp | 16 ++++++++-------- ftnoir_tracker_pt/ftnoir_tracker_pt.h | 3 +-- ftnoir_tracker_pt/ftnoir_tracker_pt_dialog.cpp | 4 ++-- ftnoir_tracker_pt/ftnoir_tracker_pt_dialog.h | 2 +- ftnoir_tracker_pt/ftnoir_tracker_pt_dll.cpp | 4 ++-- ftnoir_tracker_pt/ftnoir_tracker_pt_dll.h | 3 +-- ftnoir_tracker_rift/ftnoir_tracker_rift.cpp | 3 ++- ftnoir_tracker_rift/ftnoir_tracker_rift.h | 3 +-- ftnoir_tracker_rift/ftnoir_tracker_rift_dialog.cpp | 2 +- ftnoir_tracker_rift/ftnoir_tracker_rift_dll.cpp | 2 +- ftnoir_tracker_udp/ftnoir_tracker_udp.cpp | 2 +- ftnoir_tracker_udp/ftnoir_tracker_udp.h | 4 ++-- ftnoir_tracker_udp/ftnoir_tracker_udp_dialog.cpp | 2 +- ftnoir_tracker_udp/ftnoir_tracker_udp_dll.cpp | 2 +- 74 files changed, 101 insertions(+), 128 deletions(-) (limited to 'ftnoir_tracker_joystick/ftnoir_tracker_joystick.cpp') diff --git a/ftnoir_filter_accela/ftnoir_filter_accela.cpp b/ftnoir_filter_accela/ftnoir_filter_accela.cpp index 08e64667..b7aee77c 100644 --- a/ftnoir_filter_accela/ftnoir_filter_accela.cpp +++ b/ftnoir_filter_accela/ftnoir_filter_accela.cpp @@ -61,7 +61,7 @@ void FTNoIR_Filter::FilterHeadPoseData(const double* target_camera_position, } } -extern "C" FTNOIR_FILTER_BASE_EXPORT IFilter* CALLING_CONVENTION GetConstructor() +extern "C" OPENTRACK_EXPORT IFilter* CALLING_CONVENTION GetConstructor() { return new FTNoIR_Filter; } diff --git a/ftnoir_filter_accela/ftnoir_filter_accela.h b/ftnoir_filter_accela/ftnoir_filter_accela.h index 4a9136b5..c9a434e7 100644 --- a/ftnoir_filter_accela/ftnoir_filter_accela.h +++ b/ftnoir_filter_accela/ftnoir_filter_accela.h @@ -1,7 +1,6 @@ #pragma once -#include "ftnoir_filter_base/ftnoir_filter_base.h" #include "ui_ftnoir_accela_filtercontrols.h" -#include "facetracknoir/plugin-support.h" +#include "facetracknoir/plugin-api.hpp" #include #define ACCELA_SMOOTHING_ROTATION 60.0 diff --git a/ftnoir_filter_accela/ftnoir_filter_accela_dialog.cpp b/ftnoir_filter_accela/ftnoir_filter_accela_dialog.cpp index 41b6022b..7afcd014 100644 --- a/ftnoir_filter_accela/ftnoir_filter_accela_dialog.cpp +++ b/ftnoir_filter_accela/ftnoir_filter_accela_dialog.cpp @@ -52,7 +52,7 @@ void FilterControls::save() { accela_filter->receiveSettings(); } -extern "C" FTNOIR_FILTER_BASE_EXPORT IFilterDialog* CALLING_CONVENTION GetDialog() +extern "C" OPENTRACK_EXPORT IFilterDialog* CALLING_CONVENTION GetDialog() { return new FilterControls; } diff --git a/ftnoir_filter_accela/ftnoir_filter_accela_dll.cpp b/ftnoir_filter_accela/ftnoir_filter_accela_dll.cpp index d42baef7..e908b873 100644 --- a/ftnoir_filter_accela/ftnoir_filter_accela_dll.cpp +++ b/ftnoir_filter_accela/ftnoir_filter_accela_dll.cpp @@ -1,7 +1,7 @@ #include "ftnoir_filter_accela.h" #include "facetracknoir/plugin-support.h" -extern "C" FTNOIR_FILTER_BASE_EXPORT Metadata* CALLING_CONVENTION GetMetadata() +extern "C" OPENTRACK_EXPORT Metadata* CALLING_CONVENTION GetMetadata() { return new FTNoIR_FilterDll; } diff --git a/ftnoir_filter_ewma2/ftnoir_filter_ewma2.cpp b/ftnoir_filter_ewma2/ftnoir_filter_ewma2.cpp index d1f06a64..810cfef9 100644 --- a/ftnoir_filter_ewma2/ftnoir_filter_ewma2.cpp +++ b/ftnoir_filter_ewma2/ftnoir_filter_ewma2.cpp @@ -91,7 +91,7 @@ void FTNoIR_Filter::FilterHeadPoseData(const double *target_camera_position, } } -extern "C" FTNOIR_FILTER_BASE_EXPORT IFilter* CALLING_CONVENTION GetConstructor() +extern "C" OPENTRACK_EXPORT IFilter* CALLING_CONVENTION GetConstructor() { return new FTNoIR_Filter; } diff --git a/ftnoir_filter_ewma2/ftnoir_filter_ewma2.h b/ftnoir_filter_ewma2/ftnoir_filter_ewma2.h index 35a316e6..8863348c 100644 --- a/ftnoir_filter_ewma2/ftnoir_filter_ewma2.h +++ b/ftnoir_filter_ewma2/ftnoir_filter_ewma2.h @@ -1,7 +1,6 @@ #pragma once -#include "ftnoir_filter_base/ftnoir_filter_base.h" -#include "facetracknoir/plugin-support.h" +#include "facetracknoir/plugin-api.hpp" #include "ui_ftnoir_ewma_filtercontrols.h" #include #include diff --git a/ftnoir_filter_ewma2/ftnoir_filter_ewma2_dialog.cpp b/ftnoir_filter_ewma2/ftnoir_filter_ewma2_dialog.cpp index 437928a3..9e89bdb7 100644 --- a/ftnoir_filter_ewma2/ftnoir_filter_ewma2_dialog.cpp +++ b/ftnoir_filter_ewma2/ftnoir_filter_ewma2_dialog.cpp @@ -43,7 +43,7 @@ void FilterControls::save() { pFilter->receiveSettings(); } -extern "C" FTNOIR_FILTER_BASE_EXPORT IFilterDialog* CALLING_CONVENTION GetDialog( ) +extern "C" OPENTRACK_EXPORT IFilterDialog* CALLING_CONVENTION GetDialog( ) { return new FilterControls; } diff --git a/ftnoir_filter_ewma2/ftnoir_filter_ewma_dll.cpp b/ftnoir_filter_ewma2/ftnoir_filter_ewma_dll.cpp index 5c381e31..9a5a9148 100644 --- a/ftnoir_filter_ewma2/ftnoir_filter_ewma_dll.cpp +++ b/ftnoir_filter_ewma2/ftnoir_filter_ewma_dll.cpp @@ -1,7 +1,7 @@ #include "ftnoir_filter_ewma2.h" #include "facetracknoir/plugin-support.h" -extern "C" FTNOIR_FILTER_BASE_EXPORT Metadata* CALLING_CONVENTION GetMetadata() +extern "C" OPENTRACK_EXPORT Metadata* CALLING_CONVENTION GetMetadata() { return new FTNoIR_FilterDll; } diff --git a/ftnoir_filter_kalman/ftnoir_filter_kalman.h b/ftnoir_filter_kalman/ftnoir_filter_kalman.h index 9964d6f2..2ff172d5 100755 --- a/ftnoir_filter_kalman/ftnoir_filter_kalman.h +++ b/ftnoir_filter_kalman/ftnoir_filter_kalman.h @@ -8,9 +8,8 @@ #ifndef INCLUDED_FTN_FILTER_H #define INCLUDED_FTN_FILTER_H -#include "ftnoir_filter_base/ftnoir_filter_base.h" #include "ui_ftnoir_kalman_filtercontrols.h" -#include "facetracknoir/plugin-support.h" +#include "facetracknoir/plugin-api.hpp" #include #include #include @@ -21,7 +20,7 @@ #include "facetracknoir/options.h" using namespace options; -class FTNOIR_FILTER_BASE_EXPORT FTNoIR_Filter : public IFilter +class OPENTRACK_EXPORT FTNoIR_Filter : public IFilter { public: FTNoIR_Filter(); @@ -36,7 +35,7 @@ public: qint64 timedelta; }; -class FTNOIR_FILTER_BASE_EXPORT FTNoIR_FilterDll : public Metadata +class OPENTRACK_EXPORT FTNoIR_FilterDll : public Metadata { public: void getFullName(QString *strToBeFilled) { *strToBeFilled = QString("Kalman filter"); } @@ -45,7 +44,7 @@ public: void getIcon(QIcon *icon){ *icon = QIcon(":/images/filter-16.png"); } }; -class FTNOIR_FILTER_BASE_EXPORT FilterControls: public QWidget, public IFilterDialog +class OPENTRACK_EXPORT FilterControls: public QWidget, public IFilterDialog { Q_OBJECT public: diff --git a/ftnoir_filter_kalman/kalman.cpp b/ftnoir_filter_kalman/kalman.cpp index 1f2ebb3b..cb622d79 100644 --- a/ftnoir_filter_kalman/kalman.cpp +++ b/ftnoir_filter_kalman/kalman.cpp @@ -121,16 +121,16 @@ void FilterControls::doCancel() { close(); } -extern "C" FTNOIR_FILTER_BASE_EXPORT Metadata* CALLING_CONVENTION GetMetadata() +extern "C" OPENTRACK_EXPORT Metadata* CALLING_CONVENTION GetMetadata() { return new FTNoIR_FilterDll; } -extern "C" FTNOIR_FILTER_BASE_EXPORT IFilter* CALLING_CONVENTION GetConstructor() +extern "C" OPENTRACK_EXPORT IFilter* CALLING_CONVENTION GetConstructor() { return new FTNoIR_Filter; } -extern "C" FTNOIR_FILTER_BASE_EXPORT IFilterDialog* CALLING_CONVENTION GetDialog() { +extern "C" OPENTRACK_EXPORT IFilterDialog* CALLING_CONVENTION GetDialog() { return new FilterControls; } diff --git a/ftnoir_protocol_fg/ftnoir_protocol_fg.cpp b/ftnoir_protocol_fg/ftnoir_protocol_fg.cpp index 15a79131..45293796 100644 --- a/ftnoir_protocol_fg/ftnoir_protocol_fg.cpp +++ b/ftnoir_protocol_fg/ftnoir_protocol_fg.cpp @@ -26,8 +26,7 @@ * It is based on the (Linux) example made by Melchior FRANZ. * ********************************************************************************/ #include "ftnoir_protocol_fg.h" -#include "facetracknoir/plugin-support.h" -#include +#include "facetracknoir/plugin-api.hpp" // For Todd and Arda Kutlu @@ -58,7 +57,7 @@ bool FTNoIR_Protocol::checkServerInstallationOK() return outSocket.bind(QHostAddress::Any, 0, QUdpSocket::ShareAddress | QUdpSocket::ReuseAddressHint); } -extern "C" FTNOIR_PROTOCOL_BASE_EXPORT IProtocol* CALLING_CONVENTION GetConstructor() +extern "C" OPENTRACK_EXPORT IProtocol* CALLING_CONVENTION GetConstructor() { return new FTNoIR_Protocol; } diff --git a/ftnoir_protocol_fg/ftnoir_protocol_fg.h b/ftnoir_protocol_fg/ftnoir_protocol_fg.h index f24331d9..4b25a3e1 100644 --- a/ftnoir_protocol_fg/ftnoir_protocol_fg.h +++ b/ftnoir_protocol_fg/ftnoir_protocol_fg.h @@ -26,13 +26,12 @@ * It is based on the (Linux) example made by Melchior FRANZ. * ********************************************************************************/ #pragma once -#include "ftnoir_protocol_base/ftnoir_protocol_base.h" #include "ui_ftnoir_fgcontrols.h" #include "fgtypes.h" #include #include #include -#include "facetracknoir/plugin-support.h" +#include "facetracknoir/plugin-api.hpp" #include "facetracknoir/options.h" using namespace options; diff --git a/ftnoir_protocol_fg/ftnoir_protocol_fg_dialog.cpp b/ftnoir_protocol_fg/ftnoir_protocol_fg_dialog.cpp index d9c596b7..eb8b9a81 100644 --- a/ftnoir_protocol_fg/ftnoir_protocol_fg_dialog.cpp +++ b/ftnoir_protocol_fg/ftnoir_protocol_fg_dialog.cpp @@ -63,7 +63,7 @@ void FGControls::doCancel() { this->close(); } -extern "C" FTNOIR_PROTOCOL_BASE_EXPORT IProtocolDialog* CALLING_CONVENTION GetDialog( ) +extern "C" OPENTRACK_EXPORT IProtocolDialog* CALLING_CONVENTION GetDialog( ) { return new FGControls; } diff --git a/ftnoir_protocol_fg/ftnoir_protocol_fg_dll.cpp b/ftnoir_protocol_fg/ftnoir_protocol_fg_dll.cpp index b7e286fd..a1f065c7 100644 --- a/ftnoir_protocol_fg/ftnoir_protocol_fg_dll.cpp +++ b/ftnoir_protocol_fg/ftnoir_protocol_fg_dll.cpp @@ -26,7 +26,7 @@ #include #include "facetracknoir/plugin-support.h" -extern "C" FTNOIR_PROTOCOL_BASE_EXPORT Metadata* CALLING_CONVENTION GetMetadata() +extern "C" OPENTRACK_EXPORT Metadata* CALLING_CONVENTION GetMetadata() { return new FTNoIR_ProtocolDll; } diff --git a/ftnoir_protocol_fsuipc/ftnoir_protocol_fsuipc.cpp b/ftnoir_protocol_fsuipc/ftnoir_protocol_fsuipc.cpp index 572843c5..f5e6d5ea 100644 --- a/ftnoir_protocol_fsuipc/ftnoir_protocol_fsuipc.cpp +++ b/ftnoir_protocol_fsuipc/ftnoir_protocol_fsuipc.cpp @@ -158,7 +158,7 @@ bool FTNoIR_Protocol::checkServerInstallationOK() return true; } -extern "C" FTNOIR_PROTOCOL_BASE_EXPORT FTNoIR_Protocol* CALLING_CONVENTION GetConstructor(void) +extern "C" OPENTRACK_EXPORT FTNoIR_Protocol* CALLING_CONVENTION GetConstructor(void) { return new FTNoIR_Protocol; } diff --git a/ftnoir_protocol_fsuipc/ftnoir_protocol_fsuipc.h b/ftnoir_protocol_fsuipc/ftnoir_protocol_fsuipc.h index 6e0db58c..fd63ed6b 100644 --- a/ftnoir_protocol_fsuipc/ftnoir_protocol_fsuipc.h +++ b/ftnoir_protocol_fsuipc/ftnoir_protocol_fsuipc.h @@ -31,8 +31,7 @@ #include #include #include "FSUIPC_User.h" -#include "facetracknoir/plugin-support.h" -#include "ftnoir_protocol_base/ftnoir_protocol_base.h" +#include "facetracknoir/plugin-api.hpp" #include "ui_ftnoir_fsuipccontrols.h" #include #include diff --git a/ftnoir_protocol_fsuipc/ftnoir_protocol_fsuipc_dialog.cpp b/ftnoir_protocol_fsuipc/ftnoir_protocol_fsuipc_dialog.cpp index 89823499..e8c04dfe 100644 --- a/ftnoir_protocol_fsuipc/ftnoir_protocol_fsuipc_dialog.cpp +++ b/ftnoir_protocol_fsuipc/ftnoir_protocol_fsuipc_dialog.cpp @@ -56,7 +56,7 @@ void FSUIPCControls::getLocationOfDLL() } } -extern "C" FTNOIR_PROTOCOL_BASE_EXPORT IProtocolDialog* CALLING_CONVENTION GetDialog(void) +extern "C" OPENTRACK_EXPORT IProtocolDialog* CALLING_CONVENTION GetDialog(void) { return new FSUIPCControls; } diff --git a/ftnoir_protocol_fsuipc/ftnoir_protocol_fsuipc_dll.cpp b/ftnoir_protocol_fsuipc/ftnoir_protocol_fsuipc_dll.cpp index 6cffc4f3..b2cd6e02 100644 --- a/ftnoir_protocol_fsuipc/ftnoir_protocol_fsuipc_dll.cpp +++ b/ftnoir_protocol_fsuipc/ftnoir_protocol_fsuipc_dll.cpp @@ -25,7 +25,7 @@ #include "ftnoir_protocol_fsuipc.h" #include "facetracknoir/plugin-support.h" -extern "C" FTNOIR_PROTOCOL_BASE_EXPORT Metadata* CALLING_CONVENTION GetMetadata(void) +extern "C" OPENTRACK_EXPORT Metadata* CALLING_CONVENTION GetMetadata(void) { return new FTNoIR_ProtocolDll; } diff --git a/ftnoir_protocol_ft/ftnoir_protocol_ft.cpp b/ftnoir_protocol_ft/ftnoir_protocol_ft.cpp index 39ac649d..d0cbfa97 100644 --- a/ftnoir_protocol_ft/ftnoir_protocol_ft.cpp +++ b/ftnoir_protocol_ft/ftnoir_protocol_ft.cpp @@ -171,7 +171,7 @@ bool FTNoIR_Protocol::checkServerInstallationOK() return true; } -extern "C" FTNOIR_PROTOCOL_BASE_EXPORT IProtocol* CALLING_CONVENTION GetConstructor() +extern "C" OPENTRACK_EXPORT IProtocol* CALLING_CONVENTION GetConstructor() { return new FTNoIR_Protocol; } diff --git a/ftnoir_protocol_ft/ftnoir_protocol_ft.h b/ftnoir_protocol_ft/ftnoir_protocol_ft.h index b1d71f08..d7a792b7 100644 --- a/ftnoir_protocol_ft/ftnoir_protocol_ft.h +++ b/ftnoir_protocol_ft/ftnoir_protocol_ft.h @@ -25,9 +25,8 @@ * to games, using the FreeTrackClient.dll. * ********************************************************************************/ #pragma once -#include "ftnoir_protocol_base/ftnoir_protocol_base.h" #include "ui_ftnoir_ftcontrols.h" -#include "facetracknoir/plugin-support.h" +#include "facetracknoir/plugin-api.hpp" #include "fttypes.h" #include #include diff --git a/ftnoir_protocol_ft/ftnoir_protocol_ft_dialog.cpp b/ftnoir_protocol_ft/ftnoir_protocol_ft_dialog.cpp index 98d61675..626d5358 100644 --- a/ftnoir_protocol_ft/ftnoir_protocol_ft_dialog.cpp +++ b/ftnoir_protocol_ft/ftnoir_protocol_ft_dialog.cpp @@ -73,7 +73,7 @@ void FTControls::selectDLL() { } } -extern "C" FTNOIR_PROTOCOL_BASE_EXPORT IProtocolDialog* CALLING_CONVENTION GetDialog() +extern "C" OPENTRACK_EXPORT IProtocolDialog* CALLING_CONVENTION GetDialog() { return new FTControls; } diff --git a/ftnoir_protocol_ft/ftnoir_protocol_ft_dll.cpp b/ftnoir_protocol_ft/ftnoir_protocol_ft_dll.cpp index d5a51457..d6f05bad 100644 --- a/ftnoir_protocol_ft/ftnoir_protocol_ft_dll.cpp +++ b/ftnoir_protocol_ft/ftnoir_protocol_ft_dll.cpp @@ -1,7 +1,7 @@ #include "facetracknoir/plugin-support.h" #include "ftnoir_protocol_ft/ftnoir_protocol_ft.h" -extern "C" FTNOIR_PROTOCOL_BASE_EXPORT Metadata* CALLING_CONVENTION GetMetadata() +extern "C" OPENTRACK_EXPORT Metadata* CALLING_CONVENTION GetMetadata() { return new FTNoIR_ProtocolDll; } diff --git a/ftnoir_protocol_ftn/ftnoir_protocol_ftn.cpp b/ftnoir_protocol_ftn/ftnoir_protocol_ftn.cpp index af6f63f3..4ee7362b 100644 --- a/ftnoir_protocol_ftn/ftnoir_protocol_ftn.cpp +++ b/ftnoir_protocol_ftn/ftnoir_protocol_ftn.cpp @@ -48,7 +48,7 @@ bool FTNoIR_Protocol::checkServerInstallationOK() return outSocket.bind(QHostAddress::Any, 0, QUdpSocket::ShareAddress | QUdpSocket::ReuseAddressHint); } -extern "C" FTNOIR_PROTOCOL_BASE_EXPORT IProtocol* CALLING_CONVENTION GetConstructor() +extern "C" OPENTRACK_EXPORT IProtocol* CALLING_CONVENTION GetConstructor() { return new FTNoIR_Protocol; } diff --git a/ftnoir_protocol_ftn/ftnoir_protocol_ftn.h b/ftnoir_protocol_ftn/ftnoir_protocol_ftn.h index 498df50c..c14a7dba 100644 --- a/ftnoir_protocol_ftn/ftnoir_protocol_ftn.h +++ b/ftnoir_protocol_ftn/ftnoir_protocol_ftn.h @@ -27,14 +27,12 @@ ********************************************************************************/ #pragma once -#include "ftnoir_protocol_base/ftnoir_protocol_base.h" -#include "ftnoir_tracker_base/ftnoir_tracker_base.h" #include "ui_ftnoir_ftncontrols.h" #include #include #include #include -#include "facetracknoir/plugin-support.h" +#include "facetracknoir/plugin-api.hpp" #include "facetracknoir/options.h" using namespace options; diff --git a/ftnoir_protocol_ftn/ftnoir_protocol_ftn_dialog.cpp b/ftnoir_protocol_ftn/ftnoir_protocol_ftn_dialog.cpp index 6afe20f2..b4a92b39 100644 --- a/ftnoir_protocol_ftn/ftnoir_protocol_ftn_dialog.cpp +++ b/ftnoir_protocol_ftn/ftnoir_protocol_ftn_dialog.cpp @@ -56,7 +56,7 @@ void FTNControls::doCancel() { this->close(); } -extern "C" FTNOIR_PROTOCOL_BASE_EXPORT IProtocolDialog* CALLING_CONVENTION GetDialog( ) +extern "C" OPENTRACK_EXPORT IProtocolDialog* CALLING_CONVENTION GetDialog( ) { return new FTNControls; } diff --git a/ftnoir_protocol_ftn/ftnoir_protocol_ftn_dll.cpp b/ftnoir_protocol_ftn/ftnoir_protocol_ftn_dll.cpp index fdc2f4ca..da89a9ca 100644 --- a/ftnoir_protocol_ftn/ftnoir_protocol_ftn_dll.cpp +++ b/ftnoir_protocol_ftn/ftnoir_protocol_ftn_dll.cpp @@ -25,7 +25,7 @@ #include "ftnoir_protocol_ftn.h" #include "facetracknoir/plugin-support.h" -extern "C" FTNOIR_PROTOCOL_BASE_EXPORT Metadata* CALLING_CONVENTION GetMetadata() +extern "C" OPENTRACK_EXPORT Metadata* CALLING_CONVENTION GetMetadata() { return new FTNoIR_ProtocolDll; } diff --git a/ftnoir_protocol_libevdev/ftnoir_protocol_libevdev.cpp b/ftnoir_protocol_libevdev/ftnoir_protocol_libevdev.cpp index d2a8e5bf..ca395b34 100644 --- a/ftnoir_protocol_libevdev/ftnoir_protocol_libevdev.cpp +++ b/ftnoir_protocol_libevdev/ftnoir_protocol_libevdev.cpp @@ -1,6 +1,5 @@ #include "ftnoir_protocol_libevdev.h" -#include "facetracknoir/plugin-support.h" -//#include "ftnoir_tracker_base/ftnoir_tracker_types.h" +#include "facetracknoir/plugin-api.hpp" #include #include @@ -95,7 +94,7 @@ void FTNoIR_Protocol::sendHeadposeToGame(const double* headpose) { (void) libevdev_uinput_write_event(uidev, EV_SYN, SYN_REPORT, 0); } -extern "C" FTNOIR_PROTOCOL_BASE_EXPORT IProtocol* CALLING_CONVENTION GetConstructor() +extern "C" OPENTRACK_EXPORT IProtocol* CALLING_CONVENTION GetConstructor() { return new FTNoIR_Protocol; } diff --git a/ftnoir_protocol_libevdev/ftnoir_protocol_libevdev.h b/ftnoir_protocol_libevdev/ftnoir_protocol_libevdev.h index cb40959d..da753238 100644 --- a/ftnoir_protocol_libevdev/ftnoir_protocol_libevdev.h +++ b/ftnoir_protocol_libevdev/ftnoir_protocol_libevdev.h @@ -5,11 +5,10 @@ * copyright notice and this permission notice appear in all copies. */ #pragma once -#include "ftnoir_protocol_base/ftnoir_protocol_base.h" #include "ui_ftnoir_libevdev_controls.h" #include -#include "facetracknoir/plugin-support.h" +#include "facetracknoir/plugin-api.hpp" extern "C" { # include diff --git a/ftnoir_protocol_libevdev/ftnoir_protocol_libevdev_dialog.cpp b/ftnoir_protocol_libevdev/ftnoir_protocol_libevdev_dialog.cpp index b63cc0c7..152095d4 100644 --- a/ftnoir_protocol_libevdev/ftnoir_protocol_libevdev_dialog.cpp +++ b/ftnoir_protocol_libevdev/ftnoir_protocol_libevdev_dialog.cpp @@ -20,7 +20,7 @@ void LibevdevControls::doCancel() { void LibevdevControls::save() { } -extern "C" FTNOIR_PROTOCOL_BASE_EXPORT IProtocolDialog* CALLING_CONVENTION GetDialog( ) +extern "C" OPENTRACK_EXPORT IProtocolDialog* CALLING_CONVENTION GetDialog( ) { return new LibevdevControls; } diff --git a/ftnoir_protocol_libevdev/ftnoir_protocol_libevdev_dll.cpp b/ftnoir_protocol_libevdev/ftnoir_protocol_libevdev_dll.cpp index 639b93d7..01f7ff5f 100644 --- a/ftnoir_protocol_libevdev/ftnoir_protocol_libevdev_dll.cpp +++ b/ftnoir_protocol_libevdev/ftnoir_protocol_libevdev_dll.cpp @@ -10,7 +10,7 @@ FTNoIR_ProtocolDll::~FTNoIR_ProtocolDll() } -extern "C" FTNOIR_PROTOCOL_BASE_EXPORT Metadata* CALLING_CONVENTION GetMetadata() +extern "C" OPENTRACK_EXPORT Metadata* CALLING_CONVENTION GetMetadata() { return new FTNoIR_ProtocolDll; } diff --git a/ftnoir_protocol_mouse/ftnoir_protocol_mouse.cpp b/ftnoir_protocol_mouse/ftnoir_protocol_mouse.cpp index cd50dbe5..f78eb16d 100644 --- a/ftnoir_protocol_mouse/ftnoir_protocol_mouse.cpp +++ b/ftnoir_protocol_mouse/ftnoir_protocol_mouse.cpp @@ -63,7 +63,7 @@ bool FTNoIR_Protocol::checkServerInstallationOK() return true; } -extern "C" FTNOIR_PROTOCOL_BASE_EXPORT IProtocol* CALLING_CONVENTION GetConstructor() +extern "C" OPENTRACK_EXPORT IProtocol* CALLING_CONVENTION GetConstructor() { return new FTNoIR_Protocol; } diff --git a/ftnoir_protocol_mouse/ftnoir_protocol_mouse.h b/ftnoir_protocol_mouse/ftnoir_protocol_mouse.h index e096bf50..8f1f3ff1 100644 --- a/ftnoir_protocol_mouse/ftnoir_protocol_mouse.h +++ b/ftnoir_protocol_mouse/ftnoir_protocol_mouse.h @@ -30,7 +30,6 @@ #ifndef INCLUDED_MOUSESERVER_H #define INCLUDED_MOUSESERVER_H -#include "ftnoir_protocol_base/ftnoir_protocol_base.h" #include "ui_ftnoir_mousecontrols.h" #include #include @@ -40,7 +39,7 @@ #include #include #include -#include "facetracknoir/plugin-support.h" +#include "facetracknoir/plugin-api.hpp" #include "facetracknoir/options.h" using namespace options; diff --git a/ftnoir_protocol_mouse/ftnoir_protocol_mouse_dialog.cpp b/ftnoir_protocol_mouse/ftnoir_protocol_mouse_dialog.cpp index 63524de9..50ea8f2e 100644 --- a/ftnoir_protocol_mouse/ftnoir_protocol_mouse_dialog.cpp +++ b/ftnoir_protocol_mouse/ftnoir_protocol_mouse_dialog.cpp @@ -63,7 +63,7 @@ void MOUSEControls::doCancel() { this->close(); } -extern "C" FTNOIR_PROTOCOL_BASE_EXPORT IProtocolDialog* CALLING_CONVENTION GetDialog( ) +extern "C" OPENTRACK_EXPORT IProtocolDialog* CALLING_CONVENTION GetDialog( ) { return new MOUSEControls; } diff --git a/ftnoir_protocol_mouse/ftnoir_protocol_mouse_dll.cpp b/ftnoir_protocol_mouse/ftnoir_protocol_mouse_dll.cpp index 0f63b290..50f889db 100644 --- a/ftnoir_protocol_mouse/ftnoir_protocol_mouse_dll.cpp +++ b/ftnoir_protocol_mouse/ftnoir_protocol_mouse_dll.cpp @@ -25,7 +25,7 @@ #include "ftnoir_protocol_mouse.h" #include "facetracknoir/plugin-support.h" -extern "C" FTNOIR_PROTOCOL_BASE_EXPORT Metadata* CALLING_CONVENTION GetMetadata() +extern "C" OPENTRACK_EXPORT Metadata* CALLING_CONVENTION GetMetadata() { return new FTNoIR_ProtocolDll; } diff --git a/ftnoir_protocol_sc/ftnoir_protocol_sc.cpp b/ftnoir_protocol_sc/ftnoir_protocol_sc.cpp index b3f4b490..0901546a 100644 --- a/ftnoir_protocol_sc/ftnoir_protocol_sc.cpp +++ b/ftnoir_protocol_sc/ftnoir_protocol_sc.cpp @@ -246,7 +246,7 @@ void CALLBACK FTNoIR_Protocol::processNextSimconnectEvent(SIMCONNECT_RECV* pData } } -extern "C" FTNOIR_PROTOCOL_BASE_EXPORT IProtocol* CALLING_CONVENTION GetConstructor() +extern "C" OPENTRACK_EXPORT IProtocol* CALLING_CONVENTION GetConstructor() { return new FTNoIR_Protocol; } diff --git a/ftnoir_protocol_sc/ftnoir_protocol_sc.h b/ftnoir_protocol_sc/ftnoir_protocol_sc.h index c60f6d85..5a90224f 100644 --- a/ftnoir_protocol_sc/ftnoir_protocol_sc.h +++ b/ftnoir_protocol_sc/ftnoir_protocol_sc.h @@ -29,7 +29,7 @@ #pragma once #undef _WIN32_WINNT #define _WIN32_WINNT 0x0502 -#include "facetracknoir/plugin-support.h" +#include "facetracknoir/plugin-api.hpp" // // Prevent the SimConnect manifest from being merged in the application-manifest // This is necessary to run FaceTrackNoIR on a PC without FSX @@ -38,8 +38,7 @@ #include #include -#include -#include +#include "ui_ftnoir_sccontrols.h" #include #include #include diff --git a/ftnoir_protocol_sc/ftnoir_protocol_sc_dialog.cpp b/ftnoir_protocol_sc/ftnoir_protocol_sc_dialog.cpp index ea55cc1b..8845bec6 100644 --- a/ftnoir_protocol_sc/ftnoir_protocol_sc_dialog.cpp +++ b/ftnoir_protocol_sc/ftnoir_protocol_sc_dialog.cpp @@ -48,7 +48,7 @@ void SCControls::doCancel() { close(); } -extern "C" FTNOIR_PROTOCOL_BASE_EXPORT IProtocolDialog* CALLING_CONVENTION GetDialog( ) +extern "C" OPENTRACK_EXPORT IProtocolDialog* CALLING_CONVENTION GetDialog( ) { return new SCControls; } diff --git a/ftnoir_protocol_sc/ftnoir_protocol_sc_dll.cpp b/ftnoir_protocol_sc/ftnoir_protocol_sc_dll.cpp index e4741d42..6effb6d5 100644 --- a/ftnoir_protocol_sc/ftnoir_protocol_sc_dll.cpp +++ b/ftnoir_protocol_sc/ftnoir_protocol_sc_dll.cpp @@ -26,7 +26,7 @@ #include #include "facetracknoir/plugin-support.h" -extern "C" FTNOIR_PROTOCOL_BASE_EXPORT Metadata* CALLING_CONVENTION GetMetadata() +extern "C" OPENTRACK_EXPORT Metadata* CALLING_CONVENTION GetMetadata() { return new FTNoIR_ProtocolDll; } diff --git a/ftnoir_protocol_vjoy/ftnoir_protocol_vjoy.cpp b/ftnoir_protocol_vjoy/ftnoir_protocol_vjoy.cpp index ee7d2e85..803bc25a 100644 --- a/ftnoir_protocol_vjoy/ftnoir_protocol_vjoy.cpp +++ b/ftnoir_protocol_vjoy/ftnoir_protocol_vjoy.cpp @@ -1,6 +1,5 @@ #include "ftnoir_protocol_vjoy.h" -#include "facetracknoir/plugin-support.h" -#include +#include "facetracknoir/plugin-api.hpp" FTNoIR_Protocol::FTNoIR_Protocol() { @@ -28,7 +27,7 @@ void FTNoIR_Protocol::sendHeadposeToGame( const double *headpose ) { VJoy_UpdateJoyState(0, state); } -extern "C" FTNOIR_PROTOCOL_BASE_EXPORT IProtocol* CALLING_CONVENTION GetConstructor() +extern "C" OPENTRACK_EXPORT IProtocol* CALLING_CONVENTION GetConstructor() { return new FTNoIR_Protocol; } diff --git a/ftnoir_protocol_vjoy/ftnoir_protocol_vjoy.h b/ftnoir_protocol_vjoy/ftnoir_protocol_vjoy.h index b63a5492..6f30705f 100644 --- a/ftnoir_protocol_vjoy/ftnoir_protocol_vjoy.h +++ b/ftnoir_protocol_vjoy/ftnoir_protocol_vjoy.h @@ -26,10 +26,9 @@ * It is based on the (Linux) example made by Melchior FRANZ. * ********************************************************************************/ #pragma once -#include "ftnoir_protocol_base/ftnoir_protocol_base.h" #include "ui_ftnoir_vjoy_controls.h" #include -#include "facetracknoir/plugin-support.h" +#include "facetracknoir/plugin-api.hpp" #define FT_PROGRAMID "FT_ProgramID" diff --git a/ftnoir_protocol_vjoy/ftnoir_protocol_vjoy_dialog.cpp b/ftnoir_protocol_vjoy/ftnoir_protocol_vjoy_dialog.cpp index 66aa559e..440b12dc 100644 --- a/ftnoir_protocol_vjoy/ftnoir_protocol_vjoy_dialog.cpp +++ b/ftnoir_protocol_vjoy/ftnoir_protocol_vjoy_dialog.cpp @@ -20,7 +20,7 @@ void VJoyControls::doCancel() { void VJoyControls::save() { } -extern "C" FTNOIR_PROTOCOL_BASE_EXPORT IProtocolDialog* CALLING_CONVENTION GetDialog( ) +extern "C" OPENTRACK_EXPORT IProtocolDialog* CALLING_CONVENTION GetDialog( ) { return new VJoyControls; } diff --git a/ftnoir_protocol_vjoy/ftnoir_protocol_vjoy_dll.cpp b/ftnoir_protocol_vjoy/ftnoir_protocol_vjoy_dll.cpp index 180cd683..812a2af9 100644 --- a/ftnoir_protocol_vjoy/ftnoir_protocol_vjoy_dll.cpp +++ b/ftnoir_protocol_vjoy/ftnoir_protocol_vjoy_dll.cpp @@ -10,7 +10,7 @@ FTNoIR_ProtocolDll::~FTNoIR_ProtocolDll() } -extern "C" FTNOIR_PROTOCOL_BASE_EXPORT Metadata* CALLING_CONVENTION GetMetadata() +extern "C" OPENTRACK_EXPORT Metadata* CALLING_CONVENTION GetMetadata() { return new FTNoIR_ProtocolDll; } diff --git a/ftnoir_tracker_aruco/ftnoir_tracker_aruco.cpp b/ftnoir_tracker_aruco/ftnoir_tracker_aruco.cpp index f469c7a4..b27b96b8 100644 --- a/ftnoir_tracker_aruco/ftnoir_tracker_aruco.cpp +++ b/ftnoir_tracker_aruco/ftnoir_tracker_aruco.cpp @@ -5,10 +5,9 @@ * copyright notice and this permission notice appear in all copies. */ -#include "ftnoir_tracker_base/ftnoir_tracker_base.h" #include "ftnoir_tracker_aruco.h" #include "ui_aruco-trackercontrols.h" -#include "facetracknoir/plugin-support.h" +#include "facetracknoir/plugin-api.hpp" #include #include #include @@ -422,19 +421,19 @@ void TrackerDll::getIcon(QIcon *icon) //----------------------------------------------------------------------------- //#pragma comment(linker, "/export:GetTrackerDll=_GetTrackerDll@0") -extern "C" FTNOIR_TRACKER_BASE_EXPORT Metadata* CALLING_CONVENTION GetMetadata() +extern "C" OPENTRACK_EXPORT Metadata* CALLING_CONVENTION GetMetadata() { return new TrackerDll; } //#pragma comment(linker, "/export:GetTracker=_GetTracker@0") -extern "C" FTNOIR_TRACKER_BASE_EXPORT ITracker* CALLING_CONVENTION GetConstructor() +extern "C" OPENTRACK_EXPORT ITracker* CALLING_CONVENTION GetConstructor() { return new Tracker; } -extern "C" FTNOIR_TRACKER_BASE_EXPORT ITrackerDialog* CALLING_CONVENTION GetDialog( ) +extern "C" OPENTRACK_EXPORT ITrackerDialog* CALLING_CONVENTION GetDialog( ) { return new TrackerControls; } diff --git a/ftnoir_tracker_aruco/ftnoir_tracker_aruco.h b/ftnoir_tracker_aruco/ftnoir_tracker_aruco.h index c431d27a..b953d2b4 100644 --- a/ftnoir_tracker_aruco/ftnoir_tracker_aruco.h +++ b/ftnoir_tracker_aruco/ftnoir_tracker_aruco.h @@ -8,7 +8,6 @@ #ifndef FTNOIR_TRACKER_HT_H #define FTNOIR_TRACKER_HT_H -#include "ftnoir_tracker_base/ftnoir_tracker_base.h" #include "ui_aruco-trackercontrols.h" #include "ar_video_widget.h" #include @@ -21,6 +20,7 @@ #include #include "facetracknoir/options.h" #include "ftnoir_tracker_aruco/trans_calib.h" +#include "facetracknoir/plugin-api.hpp" using namespace options; struct settings { diff --git a/ftnoir_tracker_aruco/ftnoir_tracker_aruco_dll.h b/ftnoir_tracker_aruco/ftnoir_tracker_aruco_dll.h index af2ec00c..66e57100 100644 --- a/ftnoir_tracker_aruco/ftnoir_tracker_aruco_dll.h +++ b/ftnoir_tracker_aruco/ftnoir_tracker_aruco_dll.h @@ -5,8 +5,7 @@ * copyright notice and this permission notice appear in all copies. */ -#include "ftnoir_tracker_base/ftnoir_tracker_base.h" -#include "facetracknoir/plugin-support.h" +#include "facetracknoir/plugin-api.hpp" //----------------------------------------------------------------------------- class TrackerDll : public Metadata diff --git a/ftnoir_tracker_freepie-udp/ftnoir_tracker_freepie-udp.cpp b/ftnoir_tracker_freepie-udp/ftnoir_tracker_freepie-udp.cpp index 718ec510..143d0c06 100644 --- a/ftnoir_tracker_freepie-udp/ftnoir_tracker_freepie-udp.cpp +++ b/ftnoir_tracker_freepie-udp/ftnoir_tracker_freepie-udp.cpp @@ -97,7 +97,7 @@ void TrackerImpl::GetHeadPoseData(double *data) data[Roll] = pose[Roll]; } -extern "C" FTNOIR_TRACKER_BASE_EXPORT ITracker* CALLING_CONVENTION GetConstructor() +extern "C" OPENTRACK_EXPORT ITracker* CALLING_CONVENTION GetConstructor() { return new TrackerImpl; } diff --git a/ftnoir_tracker_freepie-udp/ftnoir_tracker_freepie-udp.h b/ftnoir_tracker_freepie-udp/ftnoir_tracker_freepie-udp.h index b3f028fc..4999053d 100644 --- a/ftnoir_tracker_freepie-udp/ftnoir_tracker_freepie-udp.h +++ b/ftnoir_tracker_freepie-udp/ftnoir_tracker_freepie-udp.h @@ -5,11 +5,10 @@ * copyright notice and this permission notice appear in all copies. */ -#include "ftnoir_tracker_base/ftnoir_tracker_base.h" #include "ui_freepie-udp-controls.h" #include #include -#include "facetracknoir/plugin-support.h" +#include "facetracknoir/plugin-api.hpp" #include "facetracknoir/options.h" using namespace options; diff --git a/ftnoir_tracker_freepie-udp/ftnoir_tracker_freepie-udp_dialog.cpp b/ftnoir_tracker_freepie-udp/ftnoir_tracker_freepie-udp_dialog.cpp index 1489e336..ee6c4284 100644 --- a/ftnoir_tracker_freepie-udp/ftnoir_tracker_freepie-udp_dialog.cpp +++ b/ftnoir_tracker_freepie-udp/ftnoir_tracker_freepie-udp_dialog.cpp @@ -21,7 +21,7 @@ void TrackerDialog::doCancel() { this->close(); } -extern "C" FTNOIR_TRACKER_BASE_EXPORT ITrackerDialog* CALLING_CONVENTION GetDialog() +extern "C" OPENTRACK_EXPORT ITrackerDialog* CALLING_CONVENTION GetDialog() { return new TrackerDialog; } diff --git a/ftnoir_tracker_freepie-udp/ftnoir_tracker_freepie-udp_dll.cpp b/ftnoir_tracker_freepie-udp/ftnoir_tracker_freepie-udp_dll.cpp index cfaa9f47..7578150f 100644 --- a/ftnoir_tracker_freepie-udp/ftnoir_tracker_freepie-udp_dll.cpp +++ b/ftnoir_tracker_freepie-udp/ftnoir_tracker_freepie-udp_dll.cpp @@ -21,7 +21,7 @@ void TrackerMeta::getIcon(QIcon *icon) *icon = QIcon(":/glovepie.png"); } -extern "C" FTNOIR_TRACKER_BASE_EXPORT Metadata* CALLING_CONVENTION GetMetadata() +extern "C" OPENTRACK_EXPORT Metadata* CALLING_CONVENTION GetMetadata() { return new TrackerMeta; } diff --git a/ftnoir_tracker_ht/ftnoir_tracker_ht.cpp b/ftnoir_tracker_ht/ftnoir_tracker_ht.cpp index 7d6fc24e..14d5faa1 100644 --- a/ftnoir_tracker_ht/ftnoir_tracker_ht.cpp +++ b/ftnoir_tracker_ht/ftnoir_tracker_ht.cpp @@ -1,10 +1,9 @@ #include "stdafx.h" -#include "ftnoir_tracker_base/ftnoir_tracker_base.h" #include "headtracker-ftnoir.h" #include "ftnoir_tracker_ht.h" #include "ftnoir_tracker_ht_dll.h" #include "ui_ht-trackercontrols.h" -#include "facetracknoir/plugin-support.h" +#include "facetracknoir/plugin-api.hpp" #include #if defined(_WIN32) @@ -197,10 +196,6 @@ void Tracker::GetHeadPoseData(double *data) shm->frame.width = 0; } if (shm->result.filled) { - if (fabs(data[Yaw]) > 60 || fabs(data[Pitch]) > 50 || fabs(data[Roll]) > 40) - { - shm->pause = true; - } data[Yaw] = shm->result.rotx; data[Pitch] = shm->result.roty; data[Roll] = shm->result.rotz; @@ -234,17 +229,17 @@ void TrackerDll::getIcon(QIcon *icon) *icon = QIcon(":/images/ht.png"); } -extern "C" FTNOIR_TRACKER_BASE_EXPORT Metadata* CALLING_CONVENTION GetMetadata() +extern "C" OPENTRACK_EXPORT Metadata* CALLING_CONVENTION GetMetadata() { return new TrackerDll; } -extern "C" FTNOIR_TRACKER_BASE_EXPORT ITracker* CALLING_CONVENTION GetConstructor() +extern "C" OPENTRACK_EXPORT ITracker* CALLING_CONVENTION GetConstructor() { return new Tracker; } -extern "C" FTNOIR_TRACKER_BASE_EXPORT ITrackerDialog* CALLING_CONVENTION GetDialog( ) +extern "C" OPENTRACK_EXPORT ITrackerDialog* CALLING_CONVENTION GetDialog( ) { return new TrackerControls; } diff --git a/ftnoir_tracker_ht/ftnoir_tracker_ht.h b/ftnoir_tracker_ht/ftnoir_tracker_ht.h index 418137bc..b9f002a4 100644 --- a/ftnoir_tracker_ht/ftnoir_tracker_ht.h +++ b/ftnoir_tracker_ht/ftnoir_tracker_ht.h @@ -9,13 +9,13 @@ #define FTNOIR_TRACKER_HT_H #include "stdafx.h" -#include "ftnoir_tracker_base/ftnoir_tracker_base.h" #include "headtracker-ftnoir.h" #include "ui_ht-trackercontrols.h" #include "ht_video_widget.h" #include "compat/compat.h" #include #include "facetracknoir/options.h" +#include "facetracknoir/plugin-api.hpp" using namespace options; struct settings { diff --git a/ftnoir_tracker_ht/ftnoir_tracker_ht_dll.h b/ftnoir_tracker_ht/ftnoir_tracker_ht_dll.h index af2ec00c..66e57100 100644 --- a/ftnoir_tracker_ht/ftnoir_tracker_ht_dll.h +++ b/ftnoir_tracker_ht/ftnoir_tracker_ht_dll.h @@ -5,8 +5,7 @@ * copyright notice and this permission notice appear in all copies. */ -#include "ftnoir_tracker_base/ftnoir_tracker_base.h" -#include "facetracknoir/plugin-support.h" +#include "facetracknoir/plugin-api.hpp" //----------------------------------------------------------------------------- class TrackerDll : public Metadata diff --git a/ftnoir_tracker_hydra/ftnoir_tracker_hydra.cpp b/ftnoir_tracker_hydra/ftnoir_tracker_hydra.cpp index 5770f015..a28bd398 100644 --- a/ftnoir_tracker_hydra/ftnoir_tracker_hydra.cpp +++ b/ftnoir_tracker_hydra/ftnoir_tracker_hydra.cpp @@ -8,6 +8,7 @@ # define SIXENSE_UTILS_STATIC_LIB #endif #include + Hydra_Tracker::Hydra_Tracker() : should_quit(false) {} #pragma GCC diagnostic ignored "-Wreorder" @@ -44,7 +45,7 @@ void Hydra_Tracker::GetHeadPoseData(double *data) data[Roll] = ypr[2] * r2d; } -extern "C" FTNOIR_TRACKER_BASE_EXPORT ITracker* CALLING_CONVENTION GetConstructor() +extern "C" OPENTRACK_EXPORT ITracker* CALLING_CONVENTION GetConstructor() { return new Hydra_Tracker; } diff --git a/ftnoir_tracker_hydra/ftnoir_tracker_hydra.h b/ftnoir_tracker_hydra/ftnoir_tracker_hydra.h index 2b3c84a7..0049d977 100644 --- a/ftnoir_tracker_hydra/ftnoir_tracker_hydra.h +++ b/ftnoir_tracker_hydra/ftnoir_tracker_hydra.h @@ -1,6 +1,5 @@ -#include "ftnoir_tracker_base/ftnoir_tracker_base.h" #include "ui_ftnoir_hydra_clientcontrols.h" -#include "facetracknoir/plugin-support.h" +#include "facetracknoir/plugin-api.hpp" #include "facetracknoir/options.h" using namespace options; diff --git a/ftnoir_tracker_hydra/ftnoir_tracker_hydra_dialog.cpp b/ftnoir_tracker_hydra/ftnoir_tracker_hydra_dialog.cpp index 3df77d15..80b5fb22 100644 --- a/ftnoir_tracker_hydra/ftnoir_tracker_hydra_dialog.cpp +++ b/ftnoir_tracker_hydra/ftnoir_tracker_hydra_dialog.cpp @@ -21,7 +21,7 @@ void TrackerControls::doCancel() { close(); } -extern "C" FTNOIR_TRACKER_BASE_EXPORT ITrackerDialog* CALLING_CONVENTION GetDialog( ) +extern "C" OPENTRACK_EXPORT ITrackerDialog* CALLING_CONVENTION GetDialog( ) { return new TrackerControls; } diff --git a/ftnoir_tracker_hydra/ftnoir_tracker_hydra_dll.cpp b/ftnoir_tracker_hydra/ftnoir_tracker_hydra_dll.cpp index b14b865c..8388ddfe 100644 --- a/ftnoir_tracker_hydra/ftnoir_tracker_hydra_dll.cpp +++ b/ftnoir_tracker_hydra/ftnoir_tracker_hydra_dll.cpp @@ -23,7 +23,7 @@ void FTNoIR_TrackerDll::getIcon(QIcon *icon) *icon = QIcon(":/images/facetracknoir.png"); } -extern "C" FTNOIR_TRACKER_BASE_EXPORT Metadata* CALLING_CONVENTION GetMetadata() +extern "C" OPENTRACK_EXPORT Metadata* CALLING_CONVENTION GetMetadata() { return new FTNoIR_TrackerDll; } diff --git a/ftnoir_tracker_joystick/ftnoir_tracker_joystick.cpp b/ftnoir_tracker_joystick/ftnoir_tracker_joystick.cpp index 90091e5d..9b98d4be 100644 --- a/ftnoir_tracker_joystick/ftnoir_tracker_joystick.cpp +++ b/ftnoir_tracker_joystick/ftnoir_tracker_joystick.cpp @@ -200,7 +200,7 @@ void FTNoIR_Tracker::GetHeadPoseData(double *data) data[i] = values[i] * limits[i] / AXIS_MAX; } -extern "C" FTNOIR_TRACKER_BASE_EXPORT ITracker* CALLING_CONVENTION GetConstructor() +extern "C" OPENTRACK_EXPORT ITracker* CALLING_CONVENTION GetConstructor() { return new FTNoIR_Tracker; } diff --git a/ftnoir_tracker_joystick/ftnoir_tracker_joystick.h b/ftnoir_tracker_joystick/ftnoir_tracker_joystick.h index 75ea9f52..2c2ebb47 100644 --- a/ftnoir_tracker_joystick/ftnoir_tracker_joystick.h +++ b/ftnoir_tracker_joystick/ftnoir_tracker_joystick.h @@ -5,7 +5,6 @@ * copyright notice and this permission notice appear in all copies. */ #pragma once -#include "ftnoir_tracker_base/ftnoir_tracker_base.h" #include "ui_ftnoir_tracker_joystick_controls.h" #include #include @@ -16,7 +15,7 @@ #include #include #include -#include "facetracknoir/plugin-support.h" +#include "facetracknoir/plugin-api.hpp" #ifndef DIRECTINPUT_VERSION # define DIRECTINPUT_VERSION 0x800 #endif diff --git a/ftnoir_tracker_joystick/ftnoir_tracker_joystick_dialog.cpp b/ftnoir_tracker_joystick/ftnoir_tracker_joystick_dialog.cpp index eea7f916..67e480a3 100644 --- a/ftnoir_tracker_joystick/ftnoir_tracker_joystick_dialog.cpp +++ b/ftnoir_tracker_joystick/ftnoir_tracker_joystick_dialog.cpp @@ -53,7 +53,7 @@ void TrackerControls::doCancel() { this->close(); } -extern "C" FTNOIR_TRACKER_BASE_EXPORT ITrackerDialog* CALLING_CONVENTION GetDialog( ) +extern "C" OPENTRACK_EXPORT ITrackerDialog* CALLING_CONVENTION GetDialog( ) { return new TrackerControls; } diff --git a/ftnoir_tracker_joystick/ftnoir_tracker_joystick_dll.cpp b/ftnoir_tracker_joystick/ftnoir_tracker_joystick_dll.cpp index f5867fea..075ed555 100644 --- a/ftnoir_tracker_joystick/ftnoir_tracker_joystick_dll.cpp +++ b/ftnoir_tracker_joystick/ftnoir_tracker_joystick_dll.cpp @@ -22,7 +22,7 @@ void FTNoIR_TrackerDll::getIcon(QIcon *icon) *icon = QIcon(":/images/facetracknoir.png"); } -extern "C" FTNOIR_TRACKER_BASE_EXPORT Metadata* CALLING_CONVENTION GetMetadata() +extern "C" OPENTRACK_EXPORT Metadata* CALLING_CONVENTION GetMetadata() { return new FTNoIR_TrackerDll; } diff --git a/ftnoir_tracker_pt/ftnoir_tracker_pt.cpp b/ftnoir_tracker_pt/ftnoir_tracker_pt.cpp index 268abeab..219c8990 100644 --- a/ftnoir_tracker_pt/ftnoir_tracker_pt.cpp +++ b/ftnoir_tracker_pt/ftnoir_tracker_pt.cpp @@ -229,9 +229,9 @@ void Tracker::GetHeadPoseData(THeadPoseData *data) Vec3f t = X_GH.t - X_GH_0.t; // get translation(s) - if (s.bEnableX) data[TX] = t[0] / 10.0; // convert to cm - if (s.bEnableY) data[TY] = t[1] / 10.0; - if (s.bEnableZ) data[TZ] = t[2] / 10.0; + data[TX] = t[0] / 10.0; // convert to cm + data[TY] = t[1] / 10.0; + data[TZ] = t[2] / 10.0; // translate rotation matrix from opengl (G) to roll-pitch-yaw (E) frame // -z -> x, y -> z, x -> -y @@ -246,18 +246,18 @@ void Tracker::GetHeadPoseData(THeadPoseData *data) alpha = atan2( R(1,0), R(0,0)); gamma = atan2( R(2,1), R(2,2)); - if (s.bEnableYaw) data[Yaw] = rad2deg * alpha; - if (s.bEnablePitch) data[Pitch] = - rad2deg * beta; // FTNoIR expects a minus here - if (s.bEnableRoll) data[Roll] = rad2deg * gamma; + data[Yaw] = rad2deg * alpha; + data[Pitch] = - rad2deg * beta; // FTNoIR expects a minus here + data[Roll] = rad2deg * gamma; } } //----------------------------------------------------------------------------- #ifdef OPENTRACK_API -extern "C" FTNOIR_TRACKER_BASE_EXPORT ITracker* CALLING_CONVENTION GetConstructor() +extern "C" OPENTRACK_EXPORT ITracker* CALLING_CONVENTION GetConstructor() #else #pragma comment(linker, "/export:GetTracker=_GetTracker@0") -FTNOIR_TRACKER_BASE_EXPORT ITrackerPtr __stdcall GetTracker() +OPENTRACK_EXPORT ITrackerPtr __stdcall GetTracker() #endif { return new Tracker; diff --git a/ftnoir_tracker_pt/ftnoir_tracker_pt.h b/ftnoir_tracker_pt/ftnoir_tracker_pt.h index 7e944fc2..63b8353e 100644 --- a/ftnoir_tracker_pt/ftnoir_tracker_pt.h +++ b/ftnoir_tracker_pt/ftnoir_tracker_pt.h @@ -9,8 +9,7 @@ #define FTNOIR_TRACKER_PT_H #ifdef OPENTRACK_API -# include "ftnoir_tracker_base/ftnoir_tracker_base.h" -# include "facetracknoir/plugin-support.h" +# include "facetracknoir/plugin-api.hpp" #endif #include "ftnoir_tracker_pt_settings.h" #include "frame_observer.h" diff --git a/ftnoir_tracker_pt/ftnoir_tracker_pt_dialog.cpp b/ftnoir_tracker_pt/ftnoir_tracker_pt_dialog.cpp index 4ba981a5..ae84ce8c 100644 --- a/ftnoir_tracker_pt/ftnoir_tracker_pt_dialog.cpp +++ b/ftnoir_tracker_pt/ftnoir_tracker_pt_dialog.cpp @@ -13,7 +13,7 @@ #ifndef OPENTRACK_API # include #else -# include +# include #endif #include @@ -308,7 +308,7 @@ void TrackerDialog::unRegisterTracker() ui.reset_button->setEnabled(false); } -extern "C" FTNOIR_TRACKER_BASE_EXPORT ITrackerDialog* CALLING_CONVENTION GetDialog( ) +extern "C" OPENTRACK_EXPORT ITrackerDialog* CALLING_CONVENTION GetDialog( ) { return new TrackerDialog; } diff --git a/ftnoir_tracker_pt/ftnoir_tracker_pt_dialog.h b/ftnoir_tracker_pt/ftnoir_tracker_pt_dialog.h index 0325160d..5cb09130 100644 --- a/ftnoir_tracker_pt/ftnoir_tracker_pt_dialog.h +++ b/ftnoir_tracker_pt/ftnoir_tracker_pt_dialog.h @@ -9,7 +9,7 @@ #define FTNOIR_TRACKER_PT_DIALOG_H #ifdef OPENTRACK_API -#include "ftnoir_tracker_base/ftnoir_tracker_base.h" +# include "facetracknoir/plugin-api.hpp" #else #include "..\ftnoir_tracker_base\ftnoir_tracker_base.h" #endif diff --git a/ftnoir_tracker_pt/ftnoir_tracker_pt_dll.cpp b/ftnoir_tracker_pt/ftnoir_tracker_pt_dll.cpp index 15e830a4..dd7b08d6 100644 --- a/ftnoir_tracker_pt/ftnoir_tracker_pt_dll.cpp +++ b/ftnoir_tracker_pt/ftnoir_tracker_pt_dll.cpp @@ -32,10 +32,10 @@ void TrackerDll::getIcon(QIcon *icon) #ifdef OPENTRACK_API # include "facetracknoir/plugin-support.h" -extern "C" FTNOIR_TRACKER_BASE_EXPORT Metadata* CALLING_CONVENTION GetMetadata() +extern "C" OPENTRACK_EXPORT Metadata* CALLING_CONVENTION GetMetadata() #else # pragma comment(linker, "/export:GetTrackerDll=_GetTrackerDll@0") -FTNOIR_TRACKER_BASE_EXPORT ITrackerDllPtr __stdcall GetTrackerDll() +OPENTRACK_EXPORT ITrackerDllPtr __stdcall GetTrackerDll() #endif { return new TrackerDll; diff --git a/ftnoir_tracker_pt/ftnoir_tracker_pt_dll.h b/ftnoir_tracker_pt/ftnoir_tracker_pt_dll.h index 22e1ff29..fce7aec2 100644 --- a/ftnoir_tracker_pt/ftnoir_tracker_pt_dll.h +++ b/ftnoir_tracker_pt/ftnoir_tracker_pt_dll.h @@ -6,8 +6,7 @@ */ #if defined(OPENTRACK_API) -# include "ftnoir_tracker_base/ftnoir_tracker_base.h" -# include "facetracknoir/plugin-support.h" +# include "facetracknoir/plugin-api.hpp" #else # include "../ftnoir_tracker_base/ftnoir_tracker_base.h" #endif diff --git a/ftnoir_tracker_rift/ftnoir_tracker_rift.cpp b/ftnoir_tracker_rift/ftnoir_tracker_rift.cpp index 46e8c29f..1cca6075 100644 --- a/ftnoir_tracker_rift/ftnoir_tracker_rift.cpp +++ b/ftnoir_tracker_rift/ftnoir_tracker_rift.cpp @@ -46,6 +46,7 @@ void Rift_Tracker::GetHeadPoseData(double *data) Quatf quat = pose.Orientation; float yaw, pitch, roll; quat.GetEulerAngles(&yaw, &pitch, &roll); + // XXX TODO move to core if (s.useYawSpring) { yaw = old_yaw*s.persistence + (yaw-old_yaw); @@ -66,7 +67,7 @@ void Rift_Tracker::GetHeadPoseData(double *data) } } -extern "C" FTNOIR_TRACKER_BASE_EXPORT ITracker* CALLING_CONVENTION GetConstructor() +extern "C" OPENTRACK_EXPORT ITracker* CALLING_CONVENTION GetConstructor() { return new Rift_Tracker; } diff --git a/ftnoir_tracker_rift/ftnoir_tracker_rift.h b/ftnoir_tracker_rift/ftnoir_tracker_rift.h index de224ca5..4ca99932 100644 --- a/ftnoir_tracker_rift/ftnoir_tracker_rift.h +++ b/ftnoir_tracker_rift/ftnoir_tracker_rift.h @@ -1,10 +1,9 @@ #pragma once -#include "ftnoir_tracker_base/ftnoir_tracker_base.h" #include "ui_ftnoir_rift_clientcontrols.h" #include #include #include -#include "facetracknoir/plugin-support.h" +#include "facetracknoir/plugin-api.hpp" #include "OVR.h" #include #include "facetracknoir/options.h" diff --git a/ftnoir_tracker_rift/ftnoir_tracker_rift_dialog.cpp b/ftnoir_tracker_rift/ftnoir_tracker_rift_dialog.cpp index 390eac0e..c95ce364 100644 --- a/ftnoir_tracker_rift/ftnoir_tracker_rift_dialog.cpp +++ b/ftnoir_tracker_rift/ftnoir_tracker_rift_dialog.cpp @@ -25,7 +25,7 @@ void TrackerControls::doCancel() { close(); } -extern "C" FTNOIR_TRACKER_BASE_EXPORT ITrackerDialog* CALLING_CONVENTION GetDialog() +extern "C" OPENTRACK_EXPORT ITrackerDialog* CALLING_CONVENTION GetDialog() { return new TrackerControls; } diff --git a/ftnoir_tracker_rift/ftnoir_tracker_rift_dll.cpp b/ftnoir_tracker_rift/ftnoir_tracker_rift_dll.cpp index 3edee290..22eec9b9 100644 --- a/ftnoir_tracker_rift/ftnoir_tracker_rift_dll.cpp +++ b/ftnoir_tracker_rift/ftnoir_tracker_rift_dll.cpp @@ -35,7 +35,7 @@ void FTNoIR_TrackerDll::getIcon(QIcon *icon) *icon = QIcon(":/images/rift_tiny.png"); } -extern "C" FTNOIR_TRACKER_BASE_EXPORT Metadata* CALLING_CONVENTION GetMetadata() +extern "C" OPENTRACK_EXPORT Metadata* CALLING_CONVENTION GetMetadata() { return new FTNoIR_TrackerDll; } diff --git a/ftnoir_tracker_udp/ftnoir_tracker_udp.cpp b/ftnoir_tracker_udp/ftnoir_tracker_udp.cpp index 335616d5..12699a58 100644 --- a/ftnoir_tracker_udp/ftnoir_tracker_udp.cpp +++ b/ftnoir_tracker_udp/ftnoir_tracker_udp.cpp @@ -66,7 +66,7 @@ void FTNoIR_Tracker::GetHeadPoseData(double *data) data[i] = last_recv_pose[i]; } -extern "C" FTNOIR_TRACKER_BASE_EXPORT ITracker* CALLING_CONVENTION GetConstructor() +extern "C" OPENTRACK_EXPORT ITracker* CALLING_CONVENTION GetConstructor() { return new FTNoIR_Tracker; } diff --git a/ftnoir_tracker_udp/ftnoir_tracker_udp.h b/ftnoir_tracker_udp/ftnoir_tracker_udp.h index 92d321b2..1d5de19b 100644 --- a/ftnoir_tracker_udp/ftnoir_tracker_udp.h +++ b/ftnoir_tracker_udp/ftnoir_tracker_udp.h @@ -1,9 +1,9 @@ -#include "ftnoir_tracker_base/ftnoir_tracker_base.h" +#pragma once #include "ui_ftnoir_ftnclientcontrols.h" #include #include #include -#include "facetracknoir/plugin-support.h" +#include "facetracknoir/plugin-api.hpp" #include "facetracknoir/options.h" using namespace options; diff --git a/ftnoir_tracker_udp/ftnoir_tracker_udp_dialog.cpp b/ftnoir_tracker_udp/ftnoir_tracker_udp_dialog.cpp index 16a59292..47166a24 100644 --- a/ftnoir_tracker_udp/ftnoir_tracker_udp_dialog.cpp +++ b/ftnoir_tracker_udp/ftnoir_tracker_udp_dialog.cpp @@ -46,7 +46,7 @@ void TrackerControls::doCancel() { this->close(); } -extern "C" FTNOIR_TRACKER_BASE_EXPORT ITrackerDialog* CALLING_CONVENTION GetDialog( ) +extern "C" OPENTRACK_EXPORT ITrackerDialog* CALLING_CONVENTION GetDialog( ) { return new TrackerControls; } diff --git a/ftnoir_tracker_udp/ftnoir_tracker_udp_dll.cpp b/ftnoir_tracker_udp/ftnoir_tracker_udp_dll.cpp index 3d6fbc28..d5745849 100644 --- a/ftnoir_tracker_udp/ftnoir_tracker_udp_dll.cpp +++ b/ftnoir_tracker_udp/ftnoir_tracker_udp_dll.cpp @@ -46,7 +46,7 @@ void FTNoIR_TrackerDll::getIcon(QIcon *icon) *icon = QIcon(":/images/facetracknoir.png"); } -extern "C" FTNOIR_TRACKER_BASE_EXPORT Metadata* CALLING_CONVENTION GetMetadata() +extern "C" OPENTRACK_EXPORT Metadata* CALLING_CONVENTION GetMetadata() { return new FTNoIR_TrackerDll; } -- cgit v1.2.3 From 29d11bc97afb5932aa1d394a6df295a364d983a9 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Mon, 22 Sep 2014 22:48:45 +0200 Subject: get rid of evil CALLING_CONVENTION macro --- facetracknoir/plugin-api.hpp | 6 - facetracknoir/plugin-support.cpp | 11 +- facetracknoir/plugin-support.h | 20 +-- ftnoir_filter_accela/ftnoir_filter_accela.cpp | 134 ++++++++++----------- .../ftnoir_filter_accela_dialog.cpp | 2 +- ftnoir_filter_accela/ftnoir_filter_accela_dll.cpp | 2 +- ftnoir_filter_ewma2/ftnoir_filter_ewma2.cpp | 2 +- ftnoir_filter_ewma2/ftnoir_filter_ewma2_dialog.cpp | 2 +- ftnoir_filter_ewma2/ftnoir_filter_ewma_dll.cpp | 2 +- ftnoir_filter_kalman/kalman.cpp | 6 +- ftnoir_protocol_fg/ftnoir_protocol_fg.cpp | 2 +- ftnoir_protocol_fg/ftnoir_protocol_fg_dialog.cpp | 2 +- ftnoir_protocol_fg/ftnoir_protocol_fg_dll.cpp | 2 +- ftnoir_protocol_fsuipc/ftnoir_protocol_fsuipc.cpp | 2 +- .../ftnoir_protocol_fsuipc_dialog.cpp | 2 +- .../ftnoir_protocol_fsuipc_dll.cpp | 2 +- ftnoir_protocol_ft/ftnoir_protocol_ft.cpp | 2 +- ftnoir_protocol_ft/ftnoir_protocol_ft_dialog.cpp | 2 +- ftnoir_protocol_ft/ftnoir_protocol_ft_dll.cpp | 2 +- ftnoir_protocol_ftn/ftnoir_protocol_ftn.cpp | 2 +- ftnoir_protocol_ftn/ftnoir_protocol_ftn_dialog.cpp | 2 +- ftnoir_protocol_ftn/ftnoir_protocol_ftn_dll.cpp | 2 +- .../ftnoir_protocol_libevdev.cpp | 2 +- .../ftnoir_protocol_libevdev_dialog.cpp | 2 +- .../ftnoir_protocol_libevdev_dll.cpp | 2 +- ftnoir_protocol_mouse/ftnoir_protocol_mouse.cpp | 2 +- .../ftnoir_protocol_mouse_dialog.cpp | 2 +- .../ftnoir_protocol_mouse_dll.cpp | 2 +- ftnoir_protocol_sc/ftnoir_protocol_sc.cpp | 2 +- ftnoir_protocol_sc/ftnoir_protocol_sc_dialog.cpp | 2 +- ftnoir_protocol_sc/ftnoir_protocol_sc_dll.cpp | 2 +- ftnoir_protocol_vjoy/ftnoir_protocol_vjoy.cpp | 2 +- .../ftnoir_protocol_vjoy_dialog.cpp | 2 +- ftnoir_protocol_vjoy/ftnoir_protocol_vjoy_dll.cpp | 2 +- ftnoir_protocol_wine/ftnoir_protocol_wine.cpp | 2 +- .../ftnoir_protocol_wine_dialog.cpp | 2 +- ftnoir_protocol_wine/ftnoir_protocol_wine_dll.cpp | 2 +- ftnoir_tracker_aruco/ftnoir_tracker_aruco.cpp | 6 +- .../ftnoir_tracker_freepie-udp.cpp | 2 +- .../ftnoir_tracker_freepie-udp_dialog.cpp | 2 +- .../ftnoir_tracker_freepie-udp_dll.cpp | 2 +- ftnoir_tracker_ht/ftnoir_tracker_ht.cpp | 6 +- ftnoir_tracker_hydra/ftnoir_tracker_hydra.cpp | 2 +- .../ftnoir_tracker_hydra_dialog.cpp | 2 +- ftnoir_tracker_hydra/ftnoir_tracker_hydra_dll.cpp | 2 +- .../ftnoir_tracker_joystick.cpp | 2 +- .../ftnoir_tracker_joystick_dialog.cpp | 2 +- .../ftnoir_tracker_joystick_dll.cpp | 2 +- ftnoir_tracker_pt/ftnoir_tracker_pt.cpp | 2 +- ftnoir_tracker_pt/ftnoir_tracker_pt_dialog.cpp | 2 +- ftnoir_tracker_pt/ftnoir_tracker_pt_dll.cpp | 2 +- ftnoir_tracker_rift/ftnoir_tracker_rift.cpp | 2 +- ftnoir_tracker_rift/ftnoir_tracker_rift_dialog.cpp | 2 +- ftnoir_tracker_rift/ftnoir_tracker_rift_dll.cpp | 2 +- ftnoir_tracker_udp/ftnoir_tracker_udp.cpp | 2 +- ftnoir_tracker_udp/ftnoir_tracker_udp_dialog.cpp | 2 +- ftnoir_tracker_udp/ftnoir_tracker_udp_dll.cpp | 2 +- 57 files changed, 133 insertions(+), 156 deletions(-) (limited to 'ftnoir_tracker_joystick/ftnoir_tracker_joystick.cpp') diff --git a/facetracknoir/plugin-api.hpp b/facetracknoir/plugin-api.hpp index d458d25c..f352a6a9 100644 --- a/facetracknoir/plugin-api.hpp +++ b/facetracknoir/plugin-api.hpp @@ -2,12 +2,6 @@ #include "facetracknoir/export.hpp" -#if defined(_WIN32) -# define CALLING_CONVENTION __stdcall -#else -# define CALLING_CONVENTION -#endif - enum Axis { TX = 0, TY, TZ, Yaw, Pitch, Roll }; diff --git a/facetracknoir/plugin-support.cpp b/facetracknoir/plugin-support.cpp index c6622fe0..35cf8f29 100644 --- a/facetracknoir/plugin-support.cpp +++ b/facetracknoir/plugin-support.cpp @@ -1,11 +1,8 @@ +#include #include "plugin-support.h" #include #include -#if !(defined(_WIN32)) -# include -#endif - SelectedLibraries* Libraries = NULL; SelectedLibraries::~SelectedLibraries() @@ -88,15 +85,15 @@ DynamicLibrary::DynamicLibrary(const QString& filename) : if (_foo::die(handle, !handle->load())) return; - Dialog = (DIALOG_FUNPTR) handle->resolve(MAYBE_STDCALL_UNDERSCORE "GetDialog" CALLING_CONVENTION_SUFFIX_VOID_FUNCTION); + Dialog = (DIALOG_FUNPTR) handle->resolve("GetDialog"); if (_foo::die(handle, !Dialog)) return; - Constructor = (CTOR_FUNPTR) handle->resolve(MAYBE_STDCALL_UNDERSCORE "GetConstructor" CALLING_CONVENTION_SUFFIX_VOID_FUNCTION); + Constructor = (CTOR_FUNPTR) handle->resolve("GetConstructor"); if (_foo::die(handle, !Constructor)) return; - Metadata = (METADATA_FUNPTR) handle->resolve(MAYBE_STDCALL_UNDERSCORE "GetMetadata" CALLING_CONVENTION_SUFFIX_VOID_FUNCTION); + Metadata = (METADATA_FUNPTR) handle->resolve("GetMetadata"); if (_foo::die(handle, !Metadata)) return; #else diff --git a/facetracknoir/plugin-support.h b/facetracknoir/plugin-support.h index 1e02bd60..3924fc09 100644 --- a/facetracknoir/plugin-support.h +++ b/facetracknoir/plugin-support.h @@ -2,20 +2,6 @@ #include "facetracknoir/plugin-api.hpp" -#if defined(_WIN32) -# define CALLING_CONVENTION_SUFFIX_VOID_FUNCTION "@0" -# ifdef _MSC_VER -# error "No support for MSVC anymore" -#else -# define MAYBE_STDCALL_UNDERSCORE "" -# endif -#else -# define CALLING_CONVENTION_SUFFIX_VOID_FUNCTION "" -# define MAYBE_STDCALL_UNDERSCORE "" -#endif - -#include - #include #include #include @@ -38,9 +24,9 @@ extern SelectedLibraries* Libraries; struct Metadata; -extern "C" typedef void* (CALLING_CONVENTION * CTOR_FUNPTR)(void); -extern "C" typedef Metadata* (CALLING_CONVENTION* METADATA_FUNPTR)(void); -extern "C" typedef void* (CALLING_CONVENTION* DIALOG_FUNPTR)(void); +extern "C" typedef void* (*CTOR_FUNPTR)(void); +extern "C" typedef Metadata* (*METADATA_FUNPTR)(void); +extern "C" typedef void* (*DIALOG_FUNPTR)(void); class DynamicLibrary { public: diff --git a/ftnoir_filter_accela/ftnoir_filter_accela.cpp b/ftnoir_filter_accela/ftnoir_filter_accela.cpp index b7aee77c..9b7b2cb2 100644 --- a/ftnoir_filter_accela/ftnoir_filter_accela.cpp +++ b/ftnoir_filter_accela/ftnoir_filter_accela.cpp @@ -1,67 +1,67 @@ -/* Copyright (c) 2012-2013 Stanislaw Halik - * - * Permission to use, copy, modify, and/or distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - */ -#include "ftnoir_filter_accela/ftnoir_filter_accela.h" -#include -#include -#include -#include -#include "facetracknoir/plugin-support.h" -using namespace std; - -FTNoIR_Filter::FTNoIR_Filter() : first_run(true) -{ -} - -static inline double parabola(const double a, const double x, const double dz, const double expt) -{ - const double sign = x > 0 ? 1 : -1; - const double a1 = 1./a; - return a1 * pow(std::max(fabs(x) - dz, 0), expt) * sign; -} - -void FTNoIR_Filter::FilterHeadPoseData(const double* target_camera_position, - double *new_camera_position) -{ - if (first_run) - { - for (int i = 0; i < 6; i++) - { - new_camera_position[i] = target_camera_position[i]; - for (int j = 0; j < 3; j++) - last_output[j][i] = target_camera_position[i]; - } - - first_run = false; - return; - } - - for (int i=0;i<6;i++) - { - const double vec = target_camera_position[i] - last_output[0][i]; - const double vec2 = target_camera_position[i] - last_output[1][i]; - const double vec3 = target_camera_position[i] - last_output[2][i]; - const int sign = vec < 0 ? -1 : 1; - const double a = i >= 3 ? s.rotation_alpha : s.translation_alpha; - const double a2 = a * s.second_order_alpha; - const double a3 = a * s.third_order_alpha; - const double deadzone = i >= 3 ? s.rot_deadzone : s.trans_deadzone; - const double velocity = - parabola(a, vec, deadzone, s.expt) + - parabola(a2, vec2, deadzone, s.expt) + - parabola(a3, vec3, deadzone, s.expt); - const double result = last_output[0][i] + velocity; - const bool done = sign > 0 ? result >= target_camera_position[i] : result <= target_camera_position[i]; - last_output[2][i] = last_output[1][i]; - last_output[1][i] = last_output[0][i]; - last_output[0][i] = new_camera_position[i] = done ? target_camera_position[i] : result; - } -} - -extern "C" OPENTRACK_EXPORT IFilter* CALLING_CONVENTION GetConstructor() -{ - return new FTNoIR_Filter; -} +/* Copyright (c) 2012-2013 Stanislaw Halik + * + * Permission to use, copy, modify, and/or distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + */ +#include "ftnoir_filter_accela/ftnoir_filter_accela.h" +#include +#include +#include +#include +#include "facetracknoir/plugin-support.h" +using namespace std; + +FTNoIR_Filter::FTNoIR_Filter() : first_run(true) +{ +} + +static inline double parabola(const double a, const double x, const double dz, const double expt) +{ + const double sign = x > 0 ? 1 : -1; + const double a1 = 1./a; + return a1 * pow(std::max(fabs(x) - dz, 0), expt) * sign; +} + +void FTNoIR_Filter::FilterHeadPoseData(const double* target_camera_position, + double *new_camera_position) +{ + if (first_run) + { + for (int i = 0; i < 6; i++) + { + new_camera_position[i] = target_camera_position[i]; + for (int j = 0; j < 3; j++) + last_output[j][i] = target_camera_position[i]; + } + + first_run = false; + return; + } + + for (int i=0;i<6;i++) + { + const double vec = target_camera_position[i] - last_output[0][i]; + const double vec2 = target_camera_position[i] - last_output[1][i]; + const double vec3 = target_camera_position[i] - last_output[2][i]; + const int sign = vec < 0 ? -1 : 1; + const double a = i >= 3 ? s.rotation_alpha : s.translation_alpha; + const double a2 = a * s.second_order_alpha; + const double a3 = a * s.third_order_alpha; + const double deadzone = i >= 3 ? s.rot_deadzone : s.trans_deadzone; + const double velocity = + parabola(a, vec, deadzone, s.expt) + + parabola(a2, vec2, deadzone, s.expt) + + parabola(a3, vec3, deadzone, s.expt); + const double result = last_output[0][i] + velocity; + const bool done = sign > 0 ? result >= target_camera_position[i] : result <= target_camera_position[i]; + last_output[2][i] = last_output[1][i]; + last_output[1][i] = last_output[0][i]; + last_output[0][i] = new_camera_position[i] = done ? target_camera_position[i] : result; + } +} + +extern "C" OPENTRACK_EXPORT IFilter* GetConstructor() +{ + return new FTNoIR_Filter; +} diff --git a/ftnoir_filter_accela/ftnoir_filter_accela_dialog.cpp b/ftnoir_filter_accela/ftnoir_filter_accela_dialog.cpp index 7afcd014..965cb3ea 100644 --- a/ftnoir_filter_accela/ftnoir_filter_accela_dialog.cpp +++ b/ftnoir_filter_accela/ftnoir_filter_accela_dialog.cpp @@ -52,7 +52,7 @@ void FilterControls::save() { accela_filter->receiveSettings(); } -extern "C" OPENTRACK_EXPORT IFilterDialog* CALLING_CONVENTION GetDialog() +extern "C" OPENTRACK_EXPORT IFilterDialog* GetDialog() { return new FilterControls; } diff --git a/ftnoir_filter_accela/ftnoir_filter_accela_dll.cpp b/ftnoir_filter_accela/ftnoir_filter_accela_dll.cpp index e908b873..65bee314 100644 --- a/ftnoir_filter_accela/ftnoir_filter_accela_dll.cpp +++ b/ftnoir_filter_accela/ftnoir_filter_accela_dll.cpp @@ -1,7 +1,7 @@ #include "ftnoir_filter_accela.h" #include "facetracknoir/plugin-support.h" -extern "C" OPENTRACK_EXPORT Metadata* CALLING_CONVENTION GetMetadata() +extern "C" OPENTRACK_EXPORT Metadata* GetMetadata() { return new FTNoIR_FilterDll; } diff --git a/ftnoir_filter_ewma2/ftnoir_filter_ewma2.cpp b/ftnoir_filter_ewma2/ftnoir_filter_ewma2.cpp index 810cfef9..c7169faa 100644 --- a/ftnoir_filter_ewma2/ftnoir_filter_ewma2.cpp +++ b/ftnoir_filter_ewma2/ftnoir_filter_ewma2.cpp @@ -91,7 +91,7 @@ void FTNoIR_Filter::FilterHeadPoseData(const double *target_camera_position, } } -extern "C" OPENTRACK_EXPORT IFilter* CALLING_CONVENTION GetConstructor() +extern "C" OPENTRACK_EXPORT IFilter* GetConstructor() { return new FTNoIR_Filter; } diff --git a/ftnoir_filter_ewma2/ftnoir_filter_ewma2_dialog.cpp b/ftnoir_filter_ewma2/ftnoir_filter_ewma2_dialog.cpp index 9e89bdb7..a32875b9 100644 --- a/ftnoir_filter_ewma2/ftnoir_filter_ewma2_dialog.cpp +++ b/ftnoir_filter_ewma2/ftnoir_filter_ewma2_dialog.cpp @@ -43,7 +43,7 @@ void FilterControls::save() { pFilter->receiveSettings(); } -extern "C" OPENTRACK_EXPORT IFilterDialog* CALLING_CONVENTION GetDialog( ) +extern "C" OPENTRACK_EXPORT IFilterDialog* GetDialog( ) { return new FilterControls; } diff --git a/ftnoir_filter_ewma2/ftnoir_filter_ewma_dll.cpp b/ftnoir_filter_ewma2/ftnoir_filter_ewma_dll.cpp index 9a5a9148..5ec6138a 100644 --- a/ftnoir_filter_ewma2/ftnoir_filter_ewma_dll.cpp +++ b/ftnoir_filter_ewma2/ftnoir_filter_ewma_dll.cpp @@ -1,7 +1,7 @@ #include "ftnoir_filter_ewma2.h" #include "facetracknoir/plugin-support.h" -extern "C" OPENTRACK_EXPORT Metadata* CALLING_CONVENTION GetMetadata() +extern "C" OPENTRACK_EXPORT Metadata* GetMetadata() { return new FTNoIR_FilterDll; } diff --git a/ftnoir_filter_kalman/kalman.cpp b/ftnoir_filter_kalman/kalman.cpp index cb622d79..70bbba8d 100644 --- a/ftnoir_filter_kalman/kalman.cpp +++ b/ftnoir_filter_kalman/kalman.cpp @@ -121,16 +121,16 @@ void FilterControls::doCancel() { close(); } -extern "C" OPENTRACK_EXPORT Metadata* CALLING_CONVENTION GetMetadata() +extern "C" OPENTRACK_EXPORT Metadata* GetMetadata() { return new FTNoIR_FilterDll; } -extern "C" OPENTRACK_EXPORT IFilter* CALLING_CONVENTION GetConstructor() +extern "C" OPENTRACK_EXPORT IFilter* GetConstructor() { return new FTNoIR_Filter; } -extern "C" OPENTRACK_EXPORT IFilterDialog* CALLING_CONVENTION GetDialog() { +extern "C" OPENTRACK_EXPORT IFilterDialog* GetDialog() { return new FilterControls; } diff --git a/ftnoir_protocol_fg/ftnoir_protocol_fg.cpp b/ftnoir_protocol_fg/ftnoir_protocol_fg.cpp index 45293796..b2d29118 100644 --- a/ftnoir_protocol_fg/ftnoir_protocol_fg.cpp +++ b/ftnoir_protocol_fg/ftnoir_protocol_fg.cpp @@ -57,7 +57,7 @@ bool FTNoIR_Protocol::checkServerInstallationOK() return outSocket.bind(QHostAddress::Any, 0, QUdpSocket::ShareAddress | QUdpSocket::ReuseAddressHint); } -extern "C" OPENTRACK_EXPORT IProtocol* CALLING_CONVENTION GetConstructor() +extern "C" OPENTRACK_EXPORT IProtocol* GetConstructor() { return new FTNoIR_Protocol; } diff --git a/ftnoir_protocol_fg/ftnoir_protocol_fg_dialog.cpp b/ftnoir_protocol_fg/ftnoir_protocol_fg_dialog.cpp index eb8b9a81..1aa67b43 100644 --- a/ftnoir_protocol_fg/ftnoir_protocol_fg_dialog.cpp +++ b/ftnoir_protocol_fg/ftnoir_protocol_fg_dialog.cpp @@ -63,7 +63,7 @@ void FGControls::doCancel() { this->close(); } -extern "C" OPENTRACK_EXPORT IProtocolDialog* CALLING_CONVENTION GetDialog( ) +extern "C" OPENTRACK_EXPORT IProtocolDialog* GetDialog( ) { return new FGControls; } diff --git a/ftnoir_protocol_fg/ftnoir_protocol_fg_dll.cpp b/ftnoir_protocol_fg/ftnoir_protocol_fg_dll.cpp index a1f065c7..f830f8f7 100644 --- a/ftnoir_protocol_fg/ftnoir_protocol_fg_dll.cpp +++ b/ftnoir_protocol_fg/ftnoir_protocol_fg_dll.cpp @@ -26,7 +26,7 @@ #include #include "facetracknoir/plugin-support.h" -extern "C" OPENTRACK_EXPORT Metadata* CALLING_CONVENTION GetMetadata() +extern "C" OPENTRACK_EXPORT Metadata* GetMetadata() { return new FTNoIR_ProtocolDll; } diff --git a/ftnoir_protocol_fsuipc/ftnoir_protocol_fsuipc.cpp b/ftnoir_protocol_fsuipc/ftnoir_protocol_fsuipc.cpp index f5e6d5ea..822cdb4d 100644 --- a/ftnoir_protocol_fsuipc/ftnoir_protocol_fsuipc.cpp +++ b/ftnoir_protocol_fsuipc/ftnoir_protocol_fsuipc.cpp @@ -158,7 +158,7 @@ bool FTNoIR_Protocol::checkServerInstallationOK() return true; } -extern "C" OPENTRACK_EXPORT FTNoIR_Protocol* CALLING_CONVENTION GetConstructor(void) +extern "C" OPENTRACK_EXPORT FTNoIR_Protocol* GetConstructor(void) { return new FTNoIR_Protocol; } diff --git a/ftnoir_protocol_fsuipc/ftnoir_protocol_fsuipc_dialog.cpp b/ftnoir_protocol_fsuipc/ftnoir_protocol_fsuipc_dialog.cpp index e8c04dfe..d2af714f 100644 --- a/ftnoir_protocol_fsuipc/ftnoir_protocol_fsuipc_dialog.cpp +++ b/ftnoir_protocol_fsuipc/ftnoir_protocol_fsuipc_dialog.cpp @@ -56,7 +56,7 @@ void FSUIPCControls::getLocationOfDLL() } } -extern "C" OPENTRACK_EXPORT IProtocolDialog* CALLING_CONVENTION GetDialog(void) +extern "C" OPENTRACK_EXPORT IProtocolDialog* GetDialog(void) { return new FSUIPCControls; } diff --git a/ftnoir_protocol_fsuipc/ftnoir_protocol_fsuipc_dll.cpp b/ftnoir_protocol_fsuipc/ftnoir_protocol_fsuipc_dll.cpp index b2cd6e02..dbea2c46 100644 --- a/ftnoir_protocol_fsuipc/ftnoir_protocol_fsuipc_dll.cpp +++ b/ftnoir_protocol_fsuipc/ftnoir_protocol_fsuipc_dll.cpp @@ -25,7 +25,7 @@ #include "ftnoir_protocol_fsuipc.h" #include "facetracknoir/plugin-support.h" -extern "C" OPENTRACK_EXPORT Metadata* CALLING_CONVENTION GetMetadata(void) +extern "C" OPENTRACK_EXPORT Metadata* GetMetadata(void) { return new FTNoIR_ProtocolDll; } diff --git a/ftnoir_protocol_ft/ftnoir_protocol_ft.cpp b/ftnoir_protocol_ft/ftnoir_protocol_ft.cpp index 8b8be63d..5c365697 100644 --- a/ftnoir_protocol_ft/ftnoir_protocol_ft.cpp +++ b/ftnoir_protocol_ft/ftnoir_protocol_ft.cpp @@ -171,7 +171,7 @@ bool FTNoIR_Protocol::checkServerInstallationOK() return true; } -extern "C" OPENTRACK_EXPORT IProtocol* CALLING_CONVENTION GetConstructor() +extern "C" OPENTRACK_EXPORT IProtocol* GetConstructor() { return new FTNoIR_Protocol; } diff --git a/ftnoir_protocol_ft/ftnoir_protocol_ft_dialog.cpp b/ftnoir_protocol_ft/ftnoir_protocol_ft_dialog.cpp index 626d5358..654f6c18 100644 --- a/ftnoir_protocol_ft/ftnoir_protocol_ft_dialog.cpp +++ b/ftnoir_protocol_ft/ftnoir_protocol_ft_dialog.cpp @@ -73,7 +73,7 @@ void FTControls::selectDLL() { } } -extern "C" OPENTRACK_EXPORT IProtocolDialog* CALLING_CONVENTION GetDialog() +extern "C" OPENTRACK_EXPORT IProtocolDialog* GetDialog() { return new FTControls; } diff --git a/ftnoir_protocol_ft/ftnoir_protocol_ft_dll.cpp b/ftnoir_protocol_ft/ftnoir_protocol_ft_dll.cpp index d6f05bad..d7a13fa5 100644 --- a/ftnoir_protocol_ft/ftnoir_protocol_ft_dll.cpp +++ b/ftnoir_protocol_ft/ftnoir_protocol_ft_dll.cpp @@ -1,7 +1,7 @@ #include "facetracknoir/plugin-support.h" #include "ftnoir_protocol_ft/ftnoir_protocol_ft.h" -extern "C" OPENTRACK_EXPORT Metadata* CALLING_CONVENTION GetMetadata() +extern "C" OPENTRACK_EXPORT Metadata* GetMetadata() { return new FTNoIR_ProtocolDll; } diff --git a/ftnoir_protocol_ftn/ftnoir_protocol_ftn.cpp b/ftnoir_protocol_ftn/ftnoir_protocol_ftn.cpp index 4ee7362b..ccff1ba5 100644 --- a/ftnoir_protocol_ftn/ftnoir_protocol_ftn.cpp +++ b/ftnoir_protocol_ftn/ftnoir_protocol_ftn.cpp @@ -48,7 +48,7 @@ bool FTNoIR_Protocol::checkServerInstallationOK() return outSocket.bind(QHostAddress::Any, 0, QUdpSocket::ShareAddress | QUdpSocket::ReuseAddressHint); } -extern "C" OPENTRACK_EXPORT IProtocol* CALLING_CONVENTION GetConstructor() +extern "C" OPENTRACK_EXPORT IProtocol* GetConstructor() { return new FTNoIR_Protocol; } diff --git a/ftnoir_protocol_ftn/ftnoir_protocol_ftn_dialog.cpp b/ftnoir_protocol_ftn/ftnoir_protocol_ftn_dialog.cpp index b4a92b39..cab5b4ba 100644 --- a/ftnoir_protocol_ftn/ftnoir_protocol_ftn_dialog.cpp +++ b/ftnoir_protocol_ftn/ftnoir_protocol_ftn_dialog.cpp @@ -56,7 +56,7 @@ void FTNControls::doCancel() { this->close(); } -extern "C" OPENTRACK_EXPORT IProtocolDialog* CALLING_CONVENTION GetDialog( ) +extern "C" OPENTRACK_EXPORT IProtocolDialog* GetDialog( ) { return new FTNControls; } diff --git a/ftnoir_protocol_ftn/ftnoir_protocol_ftn_dll.cpp b/ftnoir_protocol_ftn/ftnoir_protocol_ftn_dll.cpp index da89a9ca..0d24ccf8 100644 --- a/ftnoir_protocol_ftn/ftnoir_protocol_ftn_dll.cpp +++ b/ftnoir_protocol_ftn/ftnoir_protocol_ftn_dll.cpp @@ -25,7 +25,7 @@ #include "ftnoir_protocol_ftn.h" #include "facetracknoir/plugin-support.h" -extern "C" OPENTRACK_EXPORT Metadata* CALLING_CONVENTION GetMetadata() +extern "C" OPENTRACK_EXPORT Metadata* GetMetadata() { return new FTNoIR_ProtocolDll; } diff --git a/ftnoir_protocol_libevdev/ftnoir_protocol_libevdev.cpp b/ftnoir_protocol_libevdev/ftnoir_protocol_libevdev.cpp index ca395b34..1840fa03 100644 --- a/ftnoir_protocol_libevdev/ftnoir_protocol_libevdev.cpp +++ b/ftnoir_protocol_libevdev/ftnoir_protocol_libevdev.cpp @@ -94,7 +94,7 @@ void FTNoIR_Protocol::sendHeadposeToGame(const double* headpose) { (void) libevdev_uinput_write_event(uidev, EV_SYN, SYN_REPORT, 0); } -extern "C" OPENTRACK_EXPORT IProtocol* CALLING_CONVENTION GetConstructor() +extern "C" OPENTRACK_EXPORT IProtocol* GetConstructor() { return new FTNoIR_Protocol; } diff --git a/ftnoir_protocol_libevdev/ftnoir_protocol_libevdev_dialog.cpp b/ftnoir_protocol_libevdev/ftnoir_protocol_libevdev_dialog.cpp index 152095d4..d522610b 100644 --- a/ftnoir_protocol_libevdev/ftnoir_protocol_libevdev_dialog.cpp +++ b/ftnoir_protocol_libevdev/ftnoir_protocol_libevdev_dialog.cpp @@ -20,7 +20,7 @@ void LibevdevControls::doCancel() { void LibevdevControls::save() { } -extern "C" OPENTRACK_EXPORT IProtocolDialog* CALLING_CONVENTION GetDialog( ) +extern "C" OPENTRACK_EXPORT IProtocolDialog* GetDialog( ) { return new LibevdevControls; } diff --git a/ftnoir_protocol_libevdev/ftnoir_protocol_libevdev_dll.cpp b/ftnoir_protocol_libevdev/ftnoir_protocol_libevdev_dll.cpp index 01f7ff5f..e258b077 100644 --- a/ftnoir_protocol_libevdev/ftnoir_protocol_libevdev_dll.cpp +++ b/ftnoir_protocol_libevdev/ftnoir_protocol_libevdev_dll.cpp @@ -10,7 +10,7 @@ FTNoIR_ProtocolDll::~FTNoIR_ProtocolDll() } -extern "C" OPENTRACK_EXPORT Metadata* CALLING_CONVENTION GetMetadata() +extern "C" OPENTRACK_EXPORT Metadata* GetMetadata() { return new FTNoIR_ProtocolDll; } diff --git a/ftnoir_protocol_mouse/ftnoir_protocol_mouse.cpp b/ftnoir_protocol_mouse/ftnoir_protocol_mouse.cpp index f78eb16d..47f7a67e 100644 --- a/ftnoir_protocol_mouse/ftnoir_protocol_mouse.cpp +++ b/ftnoir_protocol_mouse/ftnoir_protocol_mouse.cpp @@ -63,7 +63,7 @@ bool FTNoIR_Protocol::checkServerInstallationOK() return true; } -extern "C" OPENTRACK_EXPORT IProtocol* CALLING_CONVENTION GetConstructor() +extern "C" OPENTRACK_EXPORT IProtocol* GetConstructor() { return new FTNoIR_Protocol; } diff --git a/ftnoir_protocol_mouse/ftnoir_protocol_mouse_dialog.cpp b/ftnoir_protocol_mouse/ftnoir_protocol_mouse_dialog.cpp index 50ea8f2e..4b12a4f0 100644 --- a/ftnoir_protocol_mouse/ftnoir_protocol_mouse_dialog.cpp +++ b/ftnoir_protocol_mouse/ftnoir_protocol_mouse_dialog.cpp @@ -63,7 +63,7 @@ void MOUSEControls::doCancel() { this->close(); } -extern "C" OPENTRACK_EXPORT IProtocolDialog* CALLING_CONVENTION GetDialog( ) +extern "C" OPENTRACK_EXPORT IProtocolDialog* GetDialog( ) { return new MOUSEControls; } diff --git a/ftnoir_protocol_mouse/ftnoir_protocol_mouse_dll.cpp b/ftnoir_protocol_mouse/ftnoir_protocol_mouse_dll.cpp index 50f889db..39bdf6e5 100644 --- a/ftnoir_protocol_mouse/ftnoir_protocol_mouse_dll.cpp +++ b/ftnoir_protocol_mouse/ftnoir_protocol_mouse_dll.cpp @@ -25,7 +25,7 @@ #include "ftnoir_protocol_mouse.h" #include "facetracknoir/plugin-support.h" -extern "C" OPENTRACK_EXPORT Metadata* CALLING_CONVENTION GetMetadata() +extern "C" OPENTRACK_EXPORT Metadata* GetMetadata() { return new FTNoIR_ProtocolDll; } diff --git a/ftnoir_protocol_sc/ftnoir_protocol_sc.cpp b/ftnoir_protocol_sc/ftnoir_protocol_sc.cpp index 0901546a..72b800d2 100644 --- a/ftnoir_protocol_sc/ftnoir_protocol_sc.cpp +++ b/ftnoir_protocol_sc/ftnoir_protocol_sc.cpp @@ -246,7 +246,7 @@ void CALLBACK FTNoIR_Protocol::processNextSimconnectEvent(SIMCONNECT_RECV* pData } } -extern "C" OPENTRACK_EXPORT IProtocol* CALLING_CONVENTION GetConstructor() +extern "C" OPENTRACK_EXPORT IProtocol* GetConstructor() { return new FTNoIR_Protocol; } diff --git a/ftnoir_protocol_sc/ftnoir_protocol_sc_dialog.cpp b/ftnoir_protocol_sc/ftnoir_protocol_sc_dialog.cpp index 8845bec6..cd8c21f9 100644 --- a/ftnoir_protocol_sc/ftnoir_protocol_sc_dialog.cpp +++ b/ftnoir_protocol_sc/ftnoir_protocol_sc_dialog.cpp @@ -48,7 +48,7 @@ void SCControls::doCancel() { close(); } -extern "C" OPENTRACK_EXPORT IProtocolDialog* CALLING_CONVENTION GetDialog( ) +extern "C" OPENTRACK_EXPORT IProtocolDialog* GetDialog( ) { return new SCControls; } diff --git a/ftnoir_protocol_sc/ftnoir_protocol_sc_dll.cpp b/ftnoir_protocol_sc/ftnoir_protocol_sc_dll.cpp index 6effb6d5..9bdbef09 100644 --- a/ftnoir_protocol_sc/ftnoir_protocol_sc_dll.cpp +++ b/ftnoir_protocol_sc/ftnoir_protocol_sc_dll.cpp @@ -26,7 +26,7 @@ #include #include "facetracknoir/plugin-support.h" -extern "C" OPENTRACK_EXPORT Metadata* CALLING_CONVENTION GetMetadata() +extern "C" OPENTRACK_EXPORT Metadata* GetMetadata() { return new FTNoIR_ProtocolDll; } diff --git a/ftnoir_protocol_vjoy/ftnoir_protocol_vjoy.cpp b/ftnoir_protocol_vjoy/ftnoir_protocol_vjoy.cpp index 2b8aa017..58fa2ab1 100644 --- a/ftnoir_protocol_vjoy/ftnoir_protocol_vjoy.cpp +++ b/ftnoir_protocol_vjoy/ftnoir_protocol_vjoy.cpp @@ -28,7 +28,7 @@ void FTNoIR_Protocol::sendHeadposeToGame( const double *headpose ) { VJoy_UpdateJoyState(0, state); } -extern "C" OPENTRACK_EXPORT IProtocol* CALLING_CONVENTION GetConstructor() +extern "C" OPENTRACK_EXPORT IProtocol* GetConstructor() { return new FTNoIR_Protocol; } diff --git a/ftnoir_protocol_vjoy/ftnoir_protocol_vjoy_dialog.cpp b/ftnoir_protocol_vjoy/ftnoir_protocol_vjoy_dialog.cpp index 440b12dc..6bd82d9a 100644 --- a/ftnoir_protocol_vjoy/ftnoir_protocol_vjoy_dialog.cpp +++ b/ftnoir_protocol_vjoy/ftnoir_protocol_vjoy_dialog.cpp @@ -20,7 +20,7 @@ void VJoyControls::doCancel() { void VJoyControls::save() { } -extern "C" OPENTRACK_EXPORT IProtocolDialog* CALLING_CONVENTION GetDialog( ) +extern "C" OPENTRACK_EXPORT IProtocolDialog* GetDialog( ) { return new VJoyControls; } diff --git a/ftnoir_protocol_vjoy/ftnoir_protocol_vjoy_dll.cpp b/ftnoir_protocol_vjoy/ftnoir_protocol_vjoy_dll.cpp index 812a2af9..367a0df6 100644 --- a/ftnoir_protocol_vjoy/ftnoir_protocol_vjoy_dll.cpp +++ b/ftnoir_protocol_vjoy/ftnoir_protocol_vjoy_dll.cpp @@ -10,7 +10,7 @@ FTNoIR_ProtocolDll::~FTNoIR_ProtocolDll() } -extern "C" OPENTRACK_EXPORT Metadata* CALLING_CONVENTION GetMetadata() +extern "C" OPENTRACK_EXPORT Metadata* GetMetadata() { return new FTNoIR_ProtocolDll; } diff --git a/ftnoir_protocol_wine/ftnoir_protocol_wine.cpp b/ftnoir_protocol_wine/ftnoir_protocol_wine.cpp index 8ebc394d..29a2a70c 100644 --- a/ftnoir_protocol_wine/ftnoir_protocol_wine.cpp +++ b/ftnoir_protocol_wine/ftnoir_protocol_wine.cpp @@ -56,7 +56,7 @@ bool FTNoIR_Protocol::checkServerInstallationOK() return lck_shm.success(); } -extern "C" OPENTRACK_EXPORT void* CALLING_CONVENTION GetConstructor() +extern "C" OPENTRACK_EXPORT void* GetConstructor() { return (IProtocol*) new FTNoIR_Protocol; } diff --git a/ftnoir_protocol_wine/ftnoir_protocol_wine_dialog.cpp b/ftnoir_protocol_wine/ftnoir_protocol_wine_dialog.cpp index bcd3df45..c092de42 100644 --- a/ftnoir_protocol_wine/ftnoir_protocol_wine_dialog.cpp +++ b/ftnoir_protocol_wine/ftnoir_protocol_wine_dialog.cpp @@ -17,7 +17,7 @@ void FTControls::doCancel() { this->close(); } -extern "C" OPENTRACK_EXPORT void* CALLING_CONVENTION GetDialog( ) +extern "C" OPENTRACK_EXPORT void* GetDialog( ) { return (IProtocolDialog*) new FTControls; } diff --git a/ftnoir_protocol_wine/ftnoir_protocol_wine_dll.cpp b/ftnoir_protocol_wine/ftnoir_protocol_wine_dll.cpp index 16e3e7c7..c6e3d433 100644 --- a/ftnoir_protocol_wine/ftnoir_protocol_wine_dll.cpp +++ b/ftnoir_protocol_wine/ftnoir_protocol_wine_dll.cpp @@ -9,7 +9,7 @@ FTNoIR_ProtocolDll::~FTNoIR_ProtocolDll() { } -extern "C" OPENTRACK_EXPORT Metadata* CALLING_CONVENTION GetMetadata() +extern "C" OPENTRACK_EXPORT Metadata* GetMetadata() { return new FTNoIR_ProtocolDll; } diff --git a/ftnoir_tracker_aruco/ftnoir_tracker_aruco.cpp b/ftnoir_tracker_aruco/ftnoir_tracker_aruco.cpp index b27b96b8..97830c9a 100644 --- a/ftnoir_tracker_aruco/ftnoir_tracker_aruco.cpp +++ b/ftnoir_tracker_aruco/ftnoir_tracker_aruco.cpp @@ -421,19 +421,19 @@ void TrackerDll::getIcon(QIcon *icon) //----------------------------------------------------------------------------- //#pragma comment(linker, "/export:GetTrackerDll=_GetTrackerDll@0") -extern "C" OPENTRACK_EXPORT Metadata* CALLING_CONVENTION GetMetadata() +extern "C" OPENTRACK_EXPORT Metadata* GetMetadata() { return new TrackerDll; } //#pragma comment(linker, "/export:GetTracker=_GetTracker@0") -extern "C" OPENTRACK_EXPORT ITracker* CALLING_CONVENTION GetConstructor() +extern "C" OPENTRACK_EXPORT ITracker* GetConstructor() { return new Tracker; } -extern "C" OPENTRACK_EXPORT ITrackerDialog* CALLING_CONVENTION GetDialog( ) +extern "C" OPENTRACK_EXPORT ITrackerDialog* GetDialog( ) { return new TrackerControls; } diff --git a/ftnoir_tracker_freepie-udp/ftnoir_tracker_freepie-udp.cpp b/ftnoir_tracker_freepie-udp/ftnoir_tracker_freepie-udp.cpp index c1faebeb..39b1f4a2 100644 --- a/ftnoir_tracker_freepie-udp/ftnoir_tracker_freepie-udp.cpp +++ b/ftnoir_tracker_freepie-udp/ftnoir_tracker_freepie-udp.cpp @@ -97,7 +97,7 @@ void TrackerImpl::GetHeadPoseData(double *data) data[Roll] = pose[Roll]; } -extern "C" OPENTRACK_EXPORT ITracker* CALLING_CONVENTION GetConstructor() +extern "C" OPENTRACK_EXPORT ITracker* GetConstructor() { return new TrackerImpl; } diff --git a/ftnoir_tracker_freepie-udp/ftnoir_tracker_freepie-udp_dialog.cpp b/ftnoir_tracker_freepie-udp/ftnoir_tracker_freepie-udp_dialog.cpp index ee6c4284..5a0cade4 100644 --- a/ftnoir_tracker_freepie-udp/ftnoir_tracker_freepie-udp_dialog.cpp +++ b/ftnoir_tracker_freepie-udp/ftnoir_tracker_freepie-udp_dialog.cpp @@ -21,7 +21,7 @@ void TrackerDialog::doCancel() { this->close(); } -extern "C" OPENTRACK_EXPORT ITrackerDialog* CALLING_CONVENTION GetDialog() +extern "C" OPENTRACK_EXPORT ITrackerDialog* GetDialog() { return new TrackerDialog; } diff --git a/ftnoir_tracker_freepie-udp/ftnoir_tracker_freepie-udp_dll.cpp b/ftnoir_tracker_freepie-udp/ftnoir_tracker_freepie-udp_dll.cpp index 7578150f..afcc8c6e 100644 --- a/ftnoir_tracker_freepie-udp/ftnoir_tracker_freepie-udp_dll.cpp +++ b/ftnoir_tracker_freepie-udp/ftnoir_tracker_freepie-udp_dll.cpp @@ -21,7 +21,7 @@ void TrackerMeta::getIcon(QIcon *icon) *icon = QIcon(":/glovepie.png"); } -extern "C" OPENTRACK_EXPORT Metadata* CALLING_CONVENTION GetMetadata() +extern "C" OPENTRACK_EXPORT Metadata* GetMetadata() { return new TrackerMeta; } diff --git a/ftnoir_tracker_ht/ftnoir_tracker_ht.cpp b/ftnoir_tracker_ht/ftnoir_tracker_ht.cpp index 15bf3a76..05eb116c 100644 --- a/ftnoir_tracker_ht/ftnoir_tracker_ht.cpp +++ b/ftnoir_tracker_ht/ftnoir_tracker_ht.cpp @@ -229,17 +229,17 @@ void TrackerDll::getIcon(QIcon *icon) *icon = QIcon(":/images/ht.png"); } -extern "C" OPENTRACK_EXPORT Metadata* CALLING_CONVENTION GetMetadata() +extern "C" OPENTRACK_EXPORT Metadata* GetMetadata() { return new TrackerDll; } -extern "C" OPENTRACK_EXPORT ITracker* CALLING_CONVENTION GetConstructor() +extern "C" OPENTRACK_EXPORT ITracker* GetConstructor() { return new Tracker; } -extern "C" OPENTRACK_EXPORT ITrackerDialog* CALLING_CONVENTION GetDialog( ) +extern "C" OPENTRACK_EXPORT ITrackerDialog* GetDialog( ) { return new TrackerControls; } diff --git a/ftnoir_tracker_hydra/ftnoir_tracker_hydra.cpp b/ftnoir_tracker_hydra/ftnoir_tracker_hydra.cpp index 03c756f9..42de16c1 100644 --- a/ftnoir_tracker_hydra/ftnoir_tracker_hydra.cpp +++ b/ftnoir_tracker_hydra/ftnoir_tracker_hydra.cpp @@ -45,7 +45,7 @@ void Hydra_Tracker::GetHeadPoseData(double *data) data[Roll] = ypr[2] * r2d; } -extern "C" OPENTRACK_EXPORT ITracker* CALLING_CONVENTION GetConstructor() +extern "C" OPENTRACK_EXPORT ITracker* GetConstructor() { return new Hydra_Tracker; } diff --git a/ftnoir_tracker_hydra/ftnoir_tracker_hydra_dialog.cpp b/ftnoir_tracker_hydra/ftnoir_tracker_hydra_dialog.cpp index 80b5fb22..dbd9981f 100644 --- a/ftnoir_tracker_hydra/ftnoir_tracker_hydra_dialog.cpp +++ b/ftnoir_tracker_hydra/ftnoir_tracker_hydra_dialog.cpp @@ -21,7 +21,7 @@ void TrackerControls::doCancel() { close(); } -extern "C" OPENTRACK_EXPORT ITrackerDialog* CALLING_CONVENTION GetDialog( ) +extern "C" OPENTRACK_EXPORT ITrackerDialog* GetDialog( ) { return new TrackerControls; } diff --git a/ftnoir_tracker_hydra/ftnoir_tracker_hydra_dll.cpp b/ftnoir_tracker_hydra/ftnoir_tracker_hydra_dll.cpp index 8388ddfe..18efea05 100644 --- a/ftnoir_tracker_hydra/ftnoir_tracker_hydra_dll.cpp +++ b/ftnoir_tracker_hydra/ftnoir_tracker_hydra_dll.cpp @@ -23,7 +23,7 @@ void FTNoIR_TrackerDll::getIcon(QIcon *icon) *icon = QIcon(":/images/facetracknoir.png"); } -extern "C" OPENTRACK_EXPORT Metadata* CALLING_CONVENTION GetMetadata() +extern "C" OPENTRACK_EXPORT Metadata* GetMetadata() { return new FTNoIR_TrackerDll; } diff --git a/ftnoir_tracker_joystick/ftnoir_tracker_joystick.cpp b/ftnoir_tracker_joystick/ftnoir_tracker_joystick.cpp index 9b98d4be..bb1076dd 100644 --- a/ftnoir_tracker_joystick/ftnoir_tracker_joystick.cpp +++ b/ftnoir_tracker_joystick/ftnoir_tracker_joystick.cpp @@ -200,7 +200,7 @@ void FTNoIR_Tracker::GetHeadPoseData(double *data) data[i] = values[i] * limits[i] / AXIS_MAX; } -extern "C" OPENTRACK_EXPORT ITracker* CALLING_CONVENTION GetConstructor() +extern "C" OPENTRACK_EXPORT ITracker* GetConstructor() { return new FTNoIR_Tracker; } diff --git a/ftnoir_tracker_joystick/ftnoir_tracker_joystick_dialog.cpp b/ftnoir_tracker_joystick/ftnoir_tracker_joystick_dialog.cpp index 67e480a3..4ddbcb0c 100644 --- a/ftnoir_tracker_joystick/ftnoir_tracker_joystick_dialog.cpp +++ b/ftnoir_tracker_joystick/ftnoir_tracker_joystick_dialog.cpp @@ -53,7 +53,7 @@ void TrackerControls::doCancel() { this->close(); } -extern "C" OPENTRACK_EXPORT ITrackerDialog* CALLING_CONVENTION GetDialog( ) +extern "C" OPENTRACK_EXPORT ITrackerDialog* GetDialog( ) { return new TrackerControls; } diff --git a/ftnoir_tracker_joystick/ftnoir_tracker_joystick_dll.cpp b/ftnoir_tracker_joystick/ftnoir_tracker_joystick_dll.cpp index 075ed555..af1a9679 100644 --- a/ftnoir_tracker_joystick/ftnoir_tracker_joystick_dll.cpp +++ b/ftnoir_tracker_joystick/ftnoir_tracker_joystick_dll.cpp @@ -22,7 +22,7 @@ void FTNoIR_TrackerDll::getIcon(QIcon *icon) *icon = QIcon(":/images/facetracknoir.png"); } -extern "C" OPENTRACK_EXPORT Metadata* CALLING_CONVENTION GetMetadata() +extern "C" OPENTRACK_EXPORT Metadata* GetMetadata() { return new FTNoIR_TrackerDll; } diff --git a/ftnoir_tracker_pt/ftnoir_tracker_pt.cpp b/ftnoir_tracker_pt/ftnoir_tracker_pt.cpp index 768a3a71..7e5ccc6c 100644 --- a/ftnoir_tracker_pt/ftnoir_tracker_pt.cpp +++ b/ftnoir_tracker_pt/ftnoir_tracker_pt.cpp @@ -245,7 +245,7 @@ void Tracker::GetHeadPoseData(THeadPoseData *data) //----------------------------------------------------------------------------- #ifdef OPENTRACK_API -extern "C" OPENTRACK_EXPORT ITracker* CALLING_CONVENTION GetConstructor() +extern "C" OPENTRACK_EXPORT ITracker* GetConstructor() #else #pragma comment(linker, "/export:GetTracker=_GetTracker@0") OPENTRACK_EXPORT ITrackerPtr __stdcall GetTracker() diff --git a/ftnoir_tracker_pt/ftnoir_tracker_pt_dialog.cpp b/ftnoir_tracker_pt/ftnoir_tracker_pt_dialog.cpp index 0e58a2e4..9529e268 100644 --- a/ftnoir_tracker_pt/ftnoir_tracker_pt_dialog.cpp +++ b/ftnoir_tracker_pt/ftnoir_tracker_pt_dialog.cpp @@ -290,7 +290,7 @@ void TrackerDialog::unRegisterTracker() //ui.center_button->setEnabled(false); } -extern "C" OPENTRACK_EXPORT ITrackerDialog* CALLING_CONVENTION GetDialog( ) +extern "C" OPENTRACK_EXPORT ITrackerDialog* GetDialog( ) { return new TrackerDialog; } diff --git a/ftnoir_tracker_pt/ftnoir_tracker_pt_dll.cpp b/ftnoir_tracker_pt/ftnoir_tracker_pt_dll.cpp index 07e1d9e7..fb756a86 100644 --- a/ftnoir_tracker_pt/ftnoir_tracker_pt_dll.cpp +++ b/ftnoir_tracker_pt/ftnoir_tracker_pt_dll.cpp @@ -32,7 +32,7 @@ void TrackerDll::getIcon(QIcon *icon) #ifdef OPENTRACK_API # include "facetracknoir/plugin-support.h" -extern "C" OPENTRACK_EXPORT Metadata* CALLING_CONVENTION GetMetadata() +extern "C" OPENTRACK_EXPORT Metadata* GetMetadata() #else # pragma comment(linker, "/export:GetTrackerDll=_GetTrackerDll@0") OPENTRACK_EXPORT ITrackerDllPtr __stdcall GetTrackerDll() diff --git a/ftnoir_tracker_rift/ftnoir_tracker_rift.cpp b/ftnoir_tracker_rift/ftnoir_tracker_rift.cpp index 1cca6075..4198a4b8 100644 --- a/ftnoir_tracker_rift/ftnoir_tracker_rift.cpp +++ b/ftnoir_tracker_rift/ftnoir_tracker_rift.cpp @@ -67,7 +67,7 @@ void Rift_Tracker::GetHeadPoseData(double *data) } } -extern "C" OPENTRACK_EXPORT ITracker* CALLING_CONVENTION GetConstructor() +extern "C" OPENTRACK_EXPORT ITracker* GetConstructor() { return new Rift_Tracker; } diff --git a/ftnoir_tracker_rift/ftnoir_tracker_rift_dialog.cpp b/ftnoir_tracker_rift/ftnoir_tracker_rift_dialog.cpp index c95ce364..a66eb83b 100644 --- a/ftnoir_tracker_rift/ftnoir_tracker_rift_dialog.cpp +++ b/ftnoir_tracker_rift/ftnoir_tracker_rift_dialog.cpp @@ -25,7 +25,7 @@ void TrackerControls::doCancel() { close(); } -extern "C" OPENTRACK_EXPORT ITrackerDialog* CALLING_CONVENTION GetDialog() +extern "C" OPENTRACK_EXPORT ITrackerDialog* GetDialog() { return new TrackerControls; } diff --git a/ftnoir_tracker_rift/ftnoir_tracker_rift_dll.cpp b/ftnoir_tracker_rift/ftnoir_tracker_rift_dll.cpp index 22eec9b9..902c8051 100644 --- a/ftnoir_tracker_rift/ftnoir_tracker_rift_dll.cpp +++ b/ftnoir_tracker_rift/ftnoir_tracker_rift_dll.cpp @@ -35,7 +35,7 @@ void FTNoIR_TrackerDll::getIcon(QIcon *icon) *icon = QIcon(":/images/rift_tiny.png"); } -extern "C" OPENTRACK_EXPORT Metadata* CALLING_CONVENTION GetMetadata() +extern "C" OPENTRACK_EXPORT Metadata* GetMetadata() { return new FTNoIR_TrackerDll; } diff --git a/ftnoir_tracker_udp/ftnoir_tracker_udp.cpp b/ftnoir_tracker_udp/ftnoir_tracker_udp.cpp index 6253529d..136e075d 100644 --- a/ftnoir_tracker_udp/ftnoir_tracker_udp.cpp +++ b/ftnoir_tracker_udp/ftnoir_tracker_udp.cpp @@ -36,7 +36,7 @@ void FTNoIR_Tracker::GetHeadPoseData(double *data) data[i] = last_recv_pose[i]; } -extern "C" OPENTRACK_EXPORT ITracker* CALLING_CONVENTION GetConstructor() +extern "C" OPENTRACK_EXPORT ITracker* GetConstructor() { return new FTNoIR_Tracker; } diff --git a/ftnoir_tracker_udp/ftnoir_tracker_udp_dialog.cpp b/ftnoir_tracker_udp/ftnoir_tracker_udp_dialog.cpp index 59683ddc..b0f40ee9 100644 --- a/ftnoir_tracker_udp/ftnoir_tracker_udp_dialog.cpp +++ b/ftnoir_tracker_udp/ftnoir_tracker_udp_dialog.cpp @@ -22,7 +22,7 @@ void TrackerControls::doCancel() { this->close(); } -extern "C" OPENTRACK_EXPORT ITrackerDialog* CALLING_CONVENTION GetDialog( ) +extern "C" OPENTRACK_EXPORT ITrackerDialog* GetDialog( ) { return new TrackerControls; } diff --git a/ftnoir_tracker_udp/ftnoir_tracker_udp_dll.cpp b/ftnoir_tracker_udp/ftnoir_tracker_udp_dll.cpp index 525a618f..7cd23552 100644 --- a/ftnoir_tracker_udp/ftnoir_tracker_udp_dll.cpp +++ b/ftnoir_tracker_udp/ftnoir_tracker_udp_dll.cpp @@ -21,7 +21,7 @@ void FTNoIR_TrackerDll::getIcon(QIcon *icon) *icon = QIcon(":/images/facetracknoir.png"); } -extern "C" OPENTRACK_EXPORT Metadata* CALLING_CONVENTION GetMetadata() +extern "C" OPENTRACK_EXPORT Metadata* GetMetadata() { return new FTNoIR_TrackerDll; } -- cgit v1.2.3