From 90ecc76a15d0a15b39be67b7a9aa337f57fe6a62 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Wed, 22 Oct 2014 14:56:37 +0200 Subject: simplify logic --- opentrack/plugin-support.cpp | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) (limited to 'opentrack') diff --git a/opentrack/plugin-support.cpp b/opentrack/plugin-support.cpp index 33d71420..d058c755 100644 --- a/opentrack/plugin-support.cpp +++ b/opentrack/plugin-support.cpp @@ -5,6 +5,8 @@ #include #include +#include + #ifndef _WIN32 # include #endif @@ -20,7 +22,7 @@ static ptr make_instance(ptr lib) if (lib != nullptr && lib->Constructor) { qDebug() << "dylib" << (lib ? lib->filename : "") << "ptr" << (intptr_t) lib->Constructor; - fflush(stderr); + std::cout.flush(); ret = ptr(reinterpret_cast(reinterpret_cast(lib->Constructor)())); } return ret; @@ -42,12 +44,14 @@ SelectedLibraries::SelectedLibraries(QFrame* frame, dylibptr t, dylibptr p, dyli return; } - if (pProtocol) - if(!pProtocol->correct()) - { - qDebug() << "protocol load failure"; - return; - } + if(!pProtocol->correct()) + { + qDebug() << "protocol load failure"; + return; + } + + qDebug() << "start tracker with frame" << (intptr_t)frame; + std::cout.flush(); pTracker->start_tracker(frame); -- cgit v1.2.3