diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2015-08-13 10:53:19 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2015-08-13 10:53:19 +0200 |
commit | 9a0cb353b8a19b186fe3c9138e058779cd53bd33 (patch) | |
tree | e8ac0cc42d63045277d5d2bd7af45c5112ec2338 /facetracknoir | |
parent | 96841349464fa38e6d0d5f79d66d4012b6ab315c (diff) |
initial broken multi-platform process lister
Diffstat (limited to 'facetracknoir')
-rwxr-xr-x[-rw-r--r--] | facetracknoir/process_detector.cpp | 34 | ||||
-rwxr-xr-x[-rw-r--r--] | facetracknoir/process_detector.h | 17 |
2 files changed, 1 insertions, 50 deletions
diff --git a/facetracknoir/process_detector.cpp b/facetracknoir/process_detector.cpp index df38eb29..19611241 100644..100755 --- a/facetracknoir/process_detector.cpp +++ b/facetracknoir/process_detector.cpp @@ -8,6 +8,7 @@ #include "process_detector.h" #include "facetracknoir/ui.h" +#include "opentrack-compat/process-list.hpp" #include <QList> #include <QFileDialog> #include <QComboBox> @@ -153,36 +154,6 @@ void process_detector::remove() ui.tableWidget->removeRow(r); } -#ifdef _WIN32 - -#include <windows.h> -#include <TlHelp32.h> - -static QStringList get_all_executable_names() -{ - QStringList ret; - HANDLE h = CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, 0); - if (h == INVALID_HANDLE_VALUE) - return ret; - - PROCESSENTRY32 e; - e.dwSize = sizeof(e); - - if (Process32First(h, &e) != TRUE) - { - CloseHandle(h); - return ret; - } - - do { - ret.append(e.szExeFile); - } while (Process32Next(h, &e) == TRUE); - - CloseHandle(h); - - return ret; -} - bool process_detector_worker::should_stop() { if (last_exe_name == "") @@ -237,6 +208,3 @@ bool process_detector_worker::config_to_start(QString& str) return false; } - - -#endif diff --git a/facetracknoir/process_detector.h b/facetracknoir/process_detector.h index 792a941f..f6497c90 100644..100755 --- a/facetracknoir/process_detector.h +++ b/facetracknoir/process_detector.h @@ -74,8 +74,6 @@ public slots: void browse(); }; -#ifdef _WIN32 - class process_detector_worker : QObject { Q_OBJECT @@ -86,18 +84,3 @@ public: bool should_stop(); }; -#else - -class process_detector_worker : QObject -{ - Q_OBJECT -public: - bool config_to_start(QString&) - { - return false; - } - bool should_stop() { return false; } - -}; - -#endif |