summaryrefslogtreecommitdiffhomepage
path: root/facetracknoir
diff options
context:
space:
mode:
Diffstat (limited to 'facetracknoir')
-rw-r--r--facetracknoir/facetracknoir.cpp8
-rw-r--r--facetracknoir/tracker.cpp13
2 files changed, 9 insertions, 12 deletions
diff --git a/facetracknoir/facetracknoir.cpp b/facetracknoir/facetracknoir.cpp
index 8940588e..2fb07baa 100644
--- a/facetracknoir/facetracknoir.cpp
+++ b/facetracknoir/facetracknoir.cpp
@@ -376,9 +376,7 @@ QFrame *FaceTrackNoIR::get_video_widget() {
/** read the name of the first video-capturing device at start up **/
/** FaceAPI can only use this first one... **/
void FaceTrackNoIR::GetCameraNameDX() {
-#if 1
-//// ui.widget->setCameraName("No video-capturing device was found in your system: check if it's connected!");
-
+#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.
@@ -568,8 +566,6 @@ void FaceTrackNoIR::saveAs()
// Load the current Settings from the currently 'active' INI-file.
//
void FaceTrackNoIR::loadSettings() {
- if (looping)
- return;
looping = true;
qDebug() << "loadSettings says: Starting ";
QSettings settings("Abbequerque Inc.", "FaceTrackNoIR"); // Registry settings (in HK_USER)
@@ -1323,6 +1319,8 @@ void FaceTrackNoIR::trackingSourceSelected(int index)
//
void FaceTrackNoIR::profileSelected(int index)
{
+ if (looping)
+ return;
//
// Read the current INI-file setting, to get the folder in which it's located...
//
diff --git a/facetracknoir/tracker.cpp b/facetracknoir/tracker.cpp
index 15b36f69..f624d6a1 100644
--- a/facetracknoir/tracker.cpp
+++ b/facetracknoir/tracker.cpp
@@ -143,15 +143,14 @@ void Tracker::run() {
bool bTracker2Confid = false;
THeadPoseData last;
+ THeadPoseData newpose;
+ THeadPoseData last_post_filter;
forever
{
if (should_quit)
break;
- // Check event for stop thread
-
- THeadPoseData newpose;
newpose.pitch = 0.0f;
newpose.roll = 0.0f;
newpose.yaw = 0.0f;
@@ -199,7 +198,7 @@ void Tracker::run() {
//
// Only copy valid values
//
- if (Tracker::confid) {
+ if (confid) {
offset_camera.x = GlobalPose->X.headPos;
offset_camera.y = GlobalPose->Y.headPos;
offset_camera.z = GlobalPose->Z.headPos;
@@ -222,7 +221,7 @@ void Tracker::run() {
do_game_zero = false;
}
- if (Tracker::do_tracking && Tracker::confid) {
+ if (do_tracking && confid) {
// get values
target_camera.x = GlobalPose->X.headPos;
target_camera.y = GlobalPose->Y.headPos;
@@ -238,7 +237,7 @@ void Tracker::run() {
// Use advanced filtering, when a filter was selected.
//
if (Libraries->pFilter) {
- THeadPoseData last_post_filter = gameoutput_camera;
+ last_post_filter = gameoutput_camera;
Libraries->pFilter->FilterHeadPoseData(&current_camera, &target_camera, &new_camera, &last_post_filter, newp);
}
else {
@@ -261,7 +260,7 @@ void Tracker::run() {
//
// Reverse Axis.
//
- if (Tracker::do_axis_reverse) {
+ if (do_axis_reverse) {
output_camera.z = Z_PosWhenReverseAxis; // Set the desired Z-position
}