summaryrefslogtreecommitdiffhomepage
path: root/FTNoIR_Protocol_FTIR
diff options
context:
space:
mode:
Diffstat (limited to 'FTNoIR_Protocol_FTIR')
-rw-r--r--FTNoIR_Protocol_FTIR/FTNoIR_FTIRcontrols.ui201
-rw-r--r--FTNoIR_Protocol_FTIR/FTNoIR_Protocol_FTIR.cpp17
-rw-r--r--FTNoIR_Protocol_FTIR/FTNoIR_Protocol_FTIR.h1
-rw-r--r--FTNoIR_Protocol_FTIR/FTNoIR_Protocol_FTIR.vcproj12
4 files changed, 168 insertions, 63 deletions
diff --git a/FTNoIR_Protocol_FTIR/FTNoIR_FTIRcontrols.ui b/FTNoIR_Protocol_FTIR/FTNoIR_FTIRcontrols.ui
index a2d06d2a..b7cbe25f 100644
--- a/FTNoIR_Protocol_FTIR/FTNoIR_FTIRcontrols.ui
+++ b/FTNoIR_Protocol_FTIR/FTNoIR_FTIRcontrols.ui
@@ -6,8 +6,8 @@
<rect>
<x>0</x>
<y>0</y>
- <width>411</width>
- <height>157</height>
+ <width>588</width>
+ <height>216</height>
</rect>
</property>
<property name="windowTitle">
@@ -25,31 +25,151 @@
</property>
<layout class="QVBoxLayout" name="_vertical_layout">
<item>
- <layout class="QHBoxLayout">
- <item>
- <spacer name="horizontalSpacer_3">
- <property name="orientation">
- <enum>Qt::Horizontal</enum>
- </property>
- <property name="sizeHint" stdset="0">
- <size>
- <width>40</width>
- <height>20</height>
- </size>
- </property>
- </spacer>
- </item>
- <item>
- <widget class="QCheckBox" name="chkTIRViews">
- <property name="layoutDirection">
- <enum>Qt::RightToLeft</enum>
- </property>
- <property name="text">
- <string>Use TIRViews</string>
- </property>
- </widget>
- </item>
- </layout>
+ <widget class="QGroupBox" name="groupBox">
+ <property name="minimumSize">
+ <size>
+ <width>0</width>
+ <height>70</height>
+ </size>
+ </property>
+ <property name="title">
+ <string>TIRViews</string>
+ </property>
+ <widget class="QCheckBox" name="chkTIRViews">
+ <property name="geometry">
+ <rect>
+ <x>70</x>
+ <y>20</y>
+ <width>88</width>
+ <height>17</height>
+ </rect>
+ </property>
+ <property name="layoutDirection">
+ <enum>Qt::RightToLeft</enum>
+ </property>
+ <property name="text">
+ <string>Use TIRViews</string>
+ </property>
+ </widget>
+ <widget class="QLabel" name="label_4">
+ <property name="geometry">
+ <rect>
+ <x>180</x>
+ <y>10</y>
+ <width>301</width>
+ <height>16</height>
+ </rect>
+ </property>
+ <property name="text">
+ <string>TIRViews is only required for some older games (like CFS3).</string>
+ </property>
+ </widget>
+ <widget class="QLabel" name="label_5">
+ <property name="geometry">
+ <rect>
+ <x>180</x>
+ <y>30</y>
+ <width>421</width>
+ <height>16</height>
+ </rect>
+ </property>
+ <property name="text">
+ <string>For it to work, TIRViews.dll must be placed in the FaceTrackNoIR program folder.</string>
+ </property>
+ <property name="wordWrap">
+ <bool>true</bool>
+ </property>
+ </widget>
+ <widget class="QLabel" name="label_6">
+ <property name="geometry">
+ <rect>
+ <x>180</x>
+ <y>50</y>
+ <width>251</width>
+ <height>16</height>
+ </rect>
+ </property>
+ <property name="text">
+ <string>If the checkbox is disabled, the DLL was not found.</string>
+ </property>
+ </widget>
+ </widget>
+ </item>
+ <item>
+ <widget class="QGroupBox" name="groupBox_2">
+ <property name="minimumSize">
+ <size>
+ <width>0</width>
+ <height>70</height>
+ </size>
+ </property>
+ <property name="title">
+ <string>TrackIR.exe</string>
+ </property>
+ <widget class="QCheckBox" name="chkStartDummy">
+ <property name="geometry">
+ <rect>
+ <x>13</x>
+ <y>20</y>
+ <width>145</width>
+ <height>17</height>
+ </rect>
+ </property>
+ <property name="layoutDirection">
+ <enum>Qt::RightToLeft</enum>
+ </property>
+ <property name="text">
+ <string>Start dummy TrackIR.exe</string>
+ </property>
+ </widget>
+ <widget class="QLabel" name="label_2">
+ <property name="geometry">
+ <rect>
+ <x>180</x>
+ <y>10</y>
+ <width>351</width>
+ <height>16</height>
+ </rect>
+ </property>
+ <property name="text">
+ <string>Some programs check, to see if a process called TrackIR.exe is running,</string>
+ </property>
+ </widget>
+ <widget class="QLabel" name="label">
+ <property name="geometry">
+ <rect>
+ <x>180</x>
+ <y>30</y>
+ <width>261</width>
+ <height>16</height>
+ </rect>
+ </property>
+ <property name="text">
+ <string>before enabling head-tracking (EZCA is one of them).</string>
+ </property>
+ <property name="wordWrap">
+ <bool>true</bool>
+ </property>
+ </widget>
+ <widget class="QLabel" name="label_3">
+ <property name="geometry">
+ <rect>
+ <x>180</x>
+ <y>50</y>
+ <width>231</width>
+ <height>16</height>
+ </rect>
+ </property>
+ <property name="text">
+ <string>Check the checkbox, to overcome this problem.</string>
+ </property>
+ </widget>
+ <zorder>chkStartDummy</zorder>
+ <zorder>label_2</zorder>
+ <zorder>label</zorder>
+ <zorder>label_3</zorder>
+ <zorder>groupBox</zorder>
+ </widget>
</item>
<item>
<spacer name="verticalSpacer">
@@ -65,32 +185,7 @@
</spacer>
</item>
<item>
- <layout class="QVBoxLayout" name="verticalLayout">
- <item>
- <widget class="QLabel" name="label_2">
- <property name="text">
- <string>TIRViews is only required for some older games (like CFS3).</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QLabel" name="label">
- <property name="text">
- <string>For it to work, TIRViews.dll must be placed in the FaceTrackNoIR program folder.</string>
- </property>
- <property name="wordWrap">
- <bool>true</bool>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QLabel" name="label_3">
- <property name="text">
- <string>If the checkbox is disabled, the DLL was not found.</string>
- </property>
- </widget>
- </item>
- </layout>
+ <layout class="QVBoxLayout" name="verticalLayout"/>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout">
diff --git a/FTNoIR_Protocol_FTIR/FTNoIR_Protocol_FTIR.cpp b/FTNoIR_Protocol_FTIR/FTNoIR_Protocol_FTIR.cpp
index 83b21f7b..82857745 100644
--- a/FTNoIR_Protocol_FTIR/FTNoIR_Protocol_FTIR.cpp
+++ b/FTNoIR_Protocol_FTIR/FTNoIR_Protocol_FTIR.cpp
@@ -62,9 +62,11 @@ FTNoIR_Protocol_FTIR::~FTNoIR_Protocol_FTIR()
//
// Kill the dummy TrackIR process.
//
- qDebug() << "FTIRServer::~FTIRServer() about to kill TrackIR.exe process";
+// qDebug() << "FTIRServer::~FTIRServer() about to kill TrackIR.exe process";
try {
if (dummyTrackIR) {
+ qDebug() << "FTIRServer::~FTIRServer() about to kill TrackIR.exe process";
+// dummyTrackIR->close();
dummyTrackIR->kill();
}
}
@@ -115,6 +117,7 @@ void FTNoIR_Protocol_FTIR::loadSettings() {
iniFile.beginGroup ( "FTIR" );
useTIRViews = iniFile.value ( "useTIRViews", 0 ).toBool();
+ useDummyExe = iniFile.value ( "useDummyExe", 1 ).toBool();
iniFile.endGroup ();
}
@@ -217,9 +220,11 @@ bool FTNoIR_Protocol_FTIR::checkServerInstallationOK( HANDLE handle )
// Some TrackIR clients check if a process called TrackIR.exe is running.
// This should do the trick
//
- QString program = "TrackIR.exe";
- dummyTrackIR = new QProcess();
- dummyTrackIR->start(program);
+ if (useDummyExe) {
+ QString program = "TrackIR.exe";
+ dummyTrackIR = new QProcess();
+ dummyTrackIR->start(program);
+ }
} catch(...) {
settings.~QSettings();
@@ -380,6 +385,7 @@ QWidget()
connect(ui.btnOK, SIGNAL(clicked()), this, SLOT(doOK()));
connect(ui.btnCancel, SIGNAL(clicked()), this, SLOT(doCancel()));
connect(ui.chkTIRViews, SIGNAL(stateChanged(int)), this, SLOT(chkTIRViewsChanged()));
+ connect(ui.chkStartDummy, SIGNAL(stateChanged(int)), this, SLOT(settingChanged()));
aFileName = QCoreApplication::applicationDirPath() + "/";
aFileName.append(FTIR_VIEWS_FILENAME);
@@ -479,6 +485,8 @@ void FTIRControls::loadSettings() {
iniFile.beginGroup ( "FTIR" );
ui.chkTIRViews->setChecked (iniFile.value ( "useTIRViews", 0 ).toBool());
+ ui.chkStartDummy->setChecked (iniFile.value ( "useDummyExe", 1 ).toBool());
+
iniFile.endGroup ();
settingsDirty = false;
@@ -495,6 +503,7 @@ void FTIRControls::save() {
iniFile.beginGroup ( "FTIR" );
iniFile.setValue ( "useTIRViews", ui.chkTIRViews->isChecked() );
+ iniFile.setValue ( "useDummyExe", ui.chkStartDummy->isChecked() );
iniFile.endGroup ();
settingsDirty = false;
diff --git a/FTNoIR_Protocol_FTIR/FTNoIR_Protocol_FTIR.h b/FTNoIR_Protocol_FTIR/FTNoIR_Protocol_FTIR.h
index 59454e90..6307c6a1 100644
--- a/FTNoIR_Protocol_FTIR/FTNoIR_Protocol_FTIR.h
+++ b/FTNoIR_Protocol_FTIR/FTNoIR_Protocol_FTIR.h
@@ -76,6 +76,7 @@ private:
QLibrary FTIRViewsLib;
QProcess *dummyTrackIR;
bool useTIRViews;
+ bool useDummyExe;
float scale2AnalogLimits( float x, float min_x, float max_x );
void loadSettings();
diff --git a/FTNoIR_Protocol_FTIR/FTNoIR_Protocol_FTIR.vcproj b/FTNoIR_Protocol_FTIR/FTNoIR_Protocol_FTIR.vcproj
index ca3f797e..6e4b6c35 100644
--- a/FTNoIR_Protocol_FTIR/FTNoIR_Protocol_FTIR.vcproj
+++ b/FTNoIR_Protocol_FTIR/FTNoIR_Protocol_FTIR.vcproj
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
- Version="8.00"
+ Version="8,00"
Name="FTNoIR_Protocol_FTIR"
ProjectGUID="{BC5B8583-036A-4A9B-84AE-01158EE6F5A4}"
RootNamespace="FTNoIR_Protocol_FTIR"
@@ -39,7 +39,7 @@
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories=".\GeneratedFiles;&quot;$(QTDIR)\include&quot;;&quot;.\GeneratedFiles\$(ConfigurationName)&quot;;&quot;$(QTDIR)\include\qtmain&quot;;&quot;$(QTDIR)\include\QtCore&quot;;&quot;$(QTDIR)\include\QtNetwork&quot;;&quot;$(QTDIR)\include\QtGui&quot;;.\"
- PreprocessorDefinitions="UNICODE;WIN32;QT_LARGEFILE_SUPPORT;QT_THREAD_SUPPORT;QT_NO_DEBUG;NDEBUG;QT_CORE_LIB;FTNOIR_PROTOCOL_BASE_LIB"
+ PreprocessorDefinitions="UNICODE;WIN32;QT_LARGEFILE_SUPPORT;QT_THREAD_SUPPORT;QT_NO_DEBUG;NDEBUG;QT_CORE_LIB;FTNOIR_PROTOCOL_BASE_LIB;QT_DLL"
RuntimeLibrary="2"
TreatWChar_tAsBuiltInType="false"
DebugInformationFormat="0"
@@ -111,7 +111,7 @@
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories=".\GeneratedFiles;$(QTDIR)\include;.\GeneratedFiles\$(ConfigurationName);$(QTDIR)\include\qtmain;$(QTDIR)\include\QtCore;.\"
- PreprocessorDefinitions="UNICODE,WIN32,QT_LARGEFILE_SUPPORT,QT_THREAD_SUPPORT,QT_CORE_LIB,FTNOIR_PROTOCOL_FTIR_LIB"
+ PreprocessorDefinitions="UNICODE,WIN32,QT_LARGEFILE_SUPPORT,QT_THREAD_SUPPORT,QT_CORE_LIB,FTNOIR_PROTOCOL_FTIR_LIB;QT_DLL"
RuntimeLibrary="3"
TreatWChar_tAsBuiltInType="false"
DebugInformationFormat="3"
@@ -198,7 +198,7 @@
<Tool
Name="VCCustomBuildTool"
Description="Moc&apos;ing $(InputFileName)..."
- CommandLine="&quot;$(QTDIR)\bin\moc.exe&quot; -DUNICODE -DWIN32 -DQT_LARGEFILE_SUPPORT -DQT_THREAD_SUPPORT -DQT_NO_DEBUG -DNDEBUG -DQT_CORE_LIB -DFTNOIR_PROTOCOL_BASE_LIB -D_WINDLL -I&quot;.\GeneratedFiles\.&quot; -I&quot;$(QTDIR)\include\.&quot; -I&quot;.\GeneratedFiles\$(ConfigurationName)\.&quot; -I&quot;$(QTDIR)\include\qtmain\.&quot; -I&quot;$(QTDIR)\include\QtCore\.&quot; -I&quot;$(QTDIR)\include\QtNetwork\.&quot; -I&quot;$(QTDIR)\include\QtGui\.&quot; -I&quot;.\.&quot; &quot;.\FTNoIR_Protocol_FTIR.h&quot; -o &quot;.\GeneratedFiles\$(ConfigurationName)\moc_$(InputName).cpp&quot;&#x0D;&#x0A;"
+ CommandLine="&quot;$(QTDIR)\bin\moc.exe&quot; -DUNICODE -DWIN32 -DQT_LARGEFILE_SUPPORT -DQT_THREAD_SUPPORT -DQT_NO_DEBUG -DNDEBUG -DQT_CORE_LIB -DFTNOIR_PROTOCOL_BASE_LIB -DQT_DLL -D_WINDLL -I&quot;.\GeneratedFiles\.&quot; -I&quot;$(QTDIR)\include\.&quot; -I&quot;.\GeneratedFiles\$(ConfigurationName)\.&quot; -I&quot;$(QTDIR)\include\qtmain\.&quot; -I&quot;$(QTDIR)\include\QtCore\.&quot; -I&quot;$(QTDIR)\include\QtNetwork\.&quot; -I&quot;$(QTDIR)\include\QtGui\.&quot; -I&quot;.\.&quot; &quot;.\FTNoIR_Protocol_FTIR.h&quot; -o &quot;.\GeneratedFiles\$(ConfigurationName)\moc_$(InputName).cpp&quot;&#x0D;&#x0A;"
AdditionalDependencies="&quot;$(QTDIR)\bin\moc.exe&quot;;$(InputPath)"
Outputs="&quot;.\GeneratedFiles\$(ConfigurationName)\moc_$(InputName).cpp&quot;"
/>
@@ -209,7 +209,7 @@
<Tool
Name="VCCustomBuildTool"
Description="Moc&apos;ing $(InputFileName)..."
- CommandLine="&quot;$(QTDIR)\bin\moc.exe&quot; -DUNICODE -DWIN32 -DQT_LARGEFILE_SUPPORT -DQT_THREAD_SUPPORT -DQT_CORE_LIB -DFTNOIR_PROTOCOL_FTIR_LIB -D_WINDLL -I&quot;.\GeneratedFiles\.&quot; -I&quot;$(QTDIR)\include\.&quot; -I&quot;.\GeneratedFiles\$(ConfigurationName)\.&quot; -I&quot;$(QTDIR)\include\qtmain\.&quot; -I&quot;$(QTDIR)\include\QtCore\.&quot; -I&quot;.\.&quot; &quot;.\FTNoIR_Protocol_FTIR.h&quot; -o &quot;.\GeneratedFiles\$(ConfigurationName)\moc_$(InputName).cpp&quot;&#x0D;&#x0A;"
+ CommandLine="&quot;$(QTDIR)\bin\moc.exe&quot; -DUNICODE -DWIN32 -DQT_LARGEFILE_SUPPORT -DQT_THREAD_SUPPORT -DQT_CORE_LIB -DFTNOIR_PROTOCOL_FTIR_LIB -DQT_DLL -D_WINDLL -I&quot;.\GeneratedFiles\.&quot; -I&quot;$(QTDIR)\include\.&quot; -I&quot;.\GeneratedFiles\$(ConfigurationName)\.&quot; -I&quot;$(QTDIR)\include\qtmain\.&quot; -I&quot;$(QTDIR)\include\QtCore\.&quot; -I&quot;.\.&quot; &quot;.\FTNoIR_Protocol_FTIR.h&quot; -o &quot;.\GeneratedFiles\$(ConfigurationName)\moc_$(InputName).cpp&quot;&#x0D;&#x0A;"
AdditionalDependencies="&quot;$(QTDIR)\bin\moc.exe&quot;;$(InputPath)"
Outputs="&quot;.\GeneratedFiles\$(ConfigurationName)\moc_$(InputName).cpp&quot;"
/>
@@ -318,7 +318,7 @@
/>
<Global
Name="QtVersion Win32"
- Value="QT462_VS2005"
+ Value="$(DefaultQtVersion)"
/>
<Global
Name="RccDir"