diff options
Diffstat (limited to 'logic/profiler/BaseProfiler.cpp')
-rw-r--r-- | logic/profiler/BaseProfiler.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/logic/profiler/BaseProfiler.cpp b/logic/profiler/BaseProfiler.cpp index 7934f6b4..94891fc4 100644 --- a/logic/profiler/BaseProfiler.cpp +++ b/logic/profiler/BaseProfiler.cpp @@ -1,6 +1,9 @@ #include "BaseProfiler.h" #include <QProcess> +#ifdef Q_OS_WIN +#include <windows.h> +#endif BaseProfiler::BaseProfiler(OneSixInstance *instance, QObject *parent) : QObject(parent), m_instance(instance) @@ -18,10 +21,11 @@ void BaseProfiler::beginProfiling(MinecraftProcess *process) qint64 BaseProfiler::pid(QProcess *process) { -#ifdef Q_OS_UNIX - return process->pid(); +#ifdef Q_OS_WIN + struct _PROCESS_INFORMATION *procinfo = process->pid(); + return procinfo->dwProcessId; #else - return (qint64)process->pid(); + return process->pid(); #endif } |