summaryrefslogtreecommitdiffhomepage
path: root/facetracknoir
diff options
context:
space:
mode:
Diffstat (limited to 'facetracknoir')
-rw-r--r--facetracknoir/facetracknoir.cpp17
-rw-r--r--facetracknoir/facetracknoir.h4
-rw-r--r--facetracknoir/global-settings.cpp6
-rw-r--r--facetracknoir/global-settings.h6
-rw-r--r--facetracknoir/global-shortcuts.cpp2
-rw-r--r--facetracknoir/shortcuts.cpp2
-rw-r--r--facetracknoir/shortcuts.h4
7 files changed, 20 insertions, 21 deletions
diff --git a/facetracknoir/facetracknoir.cpp b/facetracknoir/facetracknoir.cpp
index 85607329..6ff1759b 100644
--- a/facetracknoir/facetracknoir.cpp
+++ b/facetracknoir/facetracknoir.cpp
@@ -27,14 +27,14 @@
#include <ftnoir_tracker_ht/ht-api.h>
#include <QDebug>
-#if defined(__WIN32) || defined(_WIN32)
+#if defined(_WIN32)
# include <windows.h>
# include <dshow.h>
#endif
#if defined(__APPLE__)
# define SONAME "dylib"
-#elif defined(_WIN32) || defined(__WIN32)
+#elif defined(_WIN32)
# define SONAME "dll"
#else
# define SONAME "so"
@@ -86,7 +86,7 @@ static void fill_combobox(const QString& filter, QList<DynamicLibrary*>& list, Q
// Setup the Main Dialog
//
FaceTrackNoIR::FaceTrackNoIR(QWidget *parent, Qt::WFlags flags) :
- #if defined(__WIN32) || defined(_WIN32)
+ #if defined(_WIN32)
keybindingWorker(NULL),
#else
keyCenter(0),
@@ -544,7 +544,7 @@ void FaceTrackNoIR::startTracker( ) {
return;
}
-#if defined(_WIN32) || defined(__WIN32)
+#if defined(_WIN32)
keybindingWorker = new KeybindingWorker(*this, keyCenter);
keybindingWorker->start();
#endif
@@ -657,7 +657,7 @@ void FaceTrackNoIR::startTracker( ) {
/** stop tracking the face **/
void FaceTrackNoIR::stopTracker( ) {
ui.game_name->setText("Not connected");
-#if defined(_WIN32) || defined(__WIN32)
+#if defined(_WIN32)
if (keybindingWorker)
{
keybindingWorker->should_quit = true;
@@ -958,7 +958,7 @@ void FaceTrackNoIR::bindKeyboardShortcuts()
iniFile.beginGroup ( "KB_Shortcuts" );
int idxCenter = iniFile.value("Key_index_Center", 0).toInt();
-#if !defined(_WIN32) && !defined(__WIN32)
+#if !defined(_WIN32)
if (keyCenter) {
delete keyCenter;
keyCenter = NULL;
@@ -979,7 +979,6 @@ void FaceTrackNoIR::bindKeyboardShortcuts()
connect(keyCenter, SIGNAL(activated()), this, SLOT(shortcutRecentered()));
}
}
-
#else
keyCenter.keycode = 0;
keyCenter.shift = keyCenter.alt = keyCenter.ctrl = 0;
@@ -993,7 +992,7 @@ void FaceTrackNoIR::bindKeyboardShortcuts()
if (tracker) /* running already */
{
-#if defined(_WIN32) || defined(__WIN32)
+#if defined(_WIN32)
if (keybindingWorker)
{
keybindingWorker->should_quit = true;
@@ -1011,7 +1010,7 @@ void FaceTrackNoIR::shortcutRecentered()
{
if (tracker)
{
-#if defined(__WIN32) || defined(_WIN32)
+#if defined(_WIN32)
MessageBeep(MB_OK);
#else
QApplication::beep();
diff --git a/facetracknoir/facetracknoir.h b/facetracknoir/facetracknoir.h
index 763b5dad..8f83a851 100644
--- a/facetracknoir/facetracknoir.h
+++ b/facetracknoir/facetracknoir.h
@@ -44,7 +44,7 @@
#include <QKeySequence>
#include <QtGui>
#include <QString>
-#if !defined(_WIN32) && !defined(__WIN32)
+#if !defined(_WIN32)
# include <qxtglobalshortcut.h>
#else
# include <windows.h>
@@ -97,7 +97,7 @@ public:
return *pose.axes[idx];
}
-#if defined(_WIN32) || defined(__WIN32)
+#if defined(_WIN32)
Key keyCenter;
KeybindingWorker* keybindingWorker;
#else
diff --git a/facetracknoir/global-settings.cpp b/facetracknoir/global-settings.cpp
index f605b591..4a655171 100644
--- a/facetracknoir/global-settings.cpp
+++ b/facetracknoir/global-settings.cpp
@@ -1,6 +1,6 @@
#include "global-settings.h"
-#if !(defined(__WIN32) || defined(_WIN32))
+#if !(defined(_WIN32))
# include <dlfcn.h>
#endif
@@ -92,7 +92,7 @@ DynamicLibrary::DynamicLibrary(const QString& filename)
{
this->filename = filename;
QString fullPath = QCoreApplication::applicationDirPath() + "/" + this->filename;
-#if defined(__WIN32) || defined(_WIN32)
+#if defined(_WIN32)
handle = new QLibrary(fullPath);
Dialog = (SETTINGS_FUNCTION) handle->resolve(MAYBE_STDCALL_UNDERSCORE "GetDialog" CALLING_CONVENTION_SUFFIX_VOID_FUNCTION);
Constructor = (NULLARY_DYNAMIC_FUNCTION) handle->resolve(MAYBE_STDCALL_UNDERSCORE "GetConstructor" CALLING_CONVENTION_SUFFIX_VOID_FUNCTION);
@@ -128,7 +128,7 @@ DynamicLibrary::DynamicLibrary(const QString& filename)
DynamicLibrary::~DynamicLibrary()
{
-#if defined(__WIN32) || defined(_WIN32)
+#if defined(_WIN32)
handle->unload();
#else
if (handle)
diff --git a/facetracknoir/global-settings.h b/facetracknoir/global-settings.h
index 29a8da62..b2a54e20 100644
--- a/facetracknoir/global-settings.h
+++ b/facetracknoir/global-settings.h
@@ -1,6 +1,6 @@
#pragma once
-#if defined(_WIN32) || defined(__WIN32)
+#if defined(_WIN32)
# define CALLING_CONVENTION_SUFFIX_VOID_FUNCTION "@0"
# ifdef _MSC_VER
# define MAYBE_STDCALL_UNDERSCORE "_"
@@ -21,7 +21,7 @@
#include "ftnoir_filter_base/ftnoir_filter_base.h"
#include "ftnoir_protocol_base/ftnoir_protocol_base.h"
-#if defined(_WIN32) || defined(__WIN32)
+#if defined(_WIN32)
# define CALLING_CONVENTION __stdcall
#else
# define CALLING_CONVENTION
@@ -57,7 +57,7 @@ public:
METADATA_FUNCTION Metadata;
QString filename;
private:
-#if defined(_WIN32) || defined(__WIN32)
+#if defined(_WIN32)
QLibrary* handle;
#else
void* handle;
diff --git a/facetracknoir/global-shortcuts.cpp b/facetracknoir/global-shortcuts.cpp
index 286200c0..8666333c 100644
--- a/facetracknoir/global-shortcuts.cpp
+++ b/facetracknoir/global-shortcuts.cpp
@@ -1,6 +1,6 @@
#include "facetracknoir/facetracknoir.h"
-#if defined(__WIN32) || defined(_WIN32)
+#if defined(_WIN32)
#include <windows.h>
#include <strmif.h>
#include <dshow.h>
diff --git a/facetracknoir/shortcuts.cpp b/facetracknoir/shortcuts.cpp
index cf4b81f8..cdb2c3b7 100644
--- a/facetracknoir/shortcuts.cpp
+++ b/facetracknoir/shortcuts.cpp
@@ -125,7 +125,7 @@ void KeyboardShortcutDialog::save() {
settingsDirty = false;
}
-#if defined(__WIN32) || defined(_WIN32)
+#if defined(_WIN32)
#include <windows.h>
KeybindingWorkerImpl::~KeybindingWorkerImpl() {
diff --git a/facetracknoir/shortcuts.h b/facetracknoir/shortcuts.h
index 15256b6c..685c78b6 100644
--- a/facetracknoir/shortcuts.h
+++ b/facetracknoir/shortcuts.h
@@ -34,7 +34,7 @@ private slots:
extern QList<QString> global_key_sequences;
-#if defined(__WIN32) || defined(_WIN32)
+#if defined(_WIN32)
extern QList<int> global_windows_key_sequences;
# undef DIRECTINPUT_VERSION
# define DIRECTINPUT_VERSION 0x0800
@@ -60,7 +60,7 @@ typedef unsigned char BYTE;
struct Key { int foo; };
#endif
-#if defined(__WIN32) || defined(_WIN32)
+#if defined(_WIN32)
class KeybindingWorkerImpl {
private:
LPDIRECTINPUT8 din;