mirror of
https://github.com/UltimMC/Launcher.git
synced 2025-10-04 17:09:25 +00:00
Another attempt at fixing windows build
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user