From 53280d1a36313a83c1f925343ebdcc7a1e96d592 Mon Sep 17 00:00:00 2001 From: Dominik Louven Date: Mon, 26 Nov 2018 20:38:23 +0100 Subject: [PATCH] Disabled Windows only WinApi calls in sys info --- ScreenPlaySysInfo/cpu.h | 7 ++++--- ScreenPlayWidget/src/spwidgetmainwindow.h | 4 ++++ 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/ScreenPlaySysInfo/cpu.h b/ScreenPlaySysInfo/cpu.h index 8484e43a..c1d32ab7 100644 --- a/ScreenPlaySysInfo/cpu.h +++ b/ScreenPlaySysInfo/cpu.h @@ -9,8 +9,9 @@ #endif // https://github.com/rainmeter/rainmeter/blob/master/Library/MeasureCPU.cpp - +#ifdef Q_OS_WIN typedef LONG(WINAPI* FPNTQSI)(UINT, PVOID, ULONG, PULONG); +#endif class CPU : public QObject { Q_OBJECT @@ -69,10 +70,10 @@ private: double m_OldTime[2]; - static FPNTQSI c_NtQuerySystemInformation; + //static FPNTQSI c_NtQuerySystemInformation; static int c_NumOfProcessors; - static ULONG c_BufferSize; + //static ULONG c_BufferSize; int m_tickRate = 500; QTimer m_updateTimer; }; diff --git a/ScreenPlayWidget/src/spwidgetmainwindow.h b/ScreenPlayWidget/src/spwidgetmainwindow.h index 1872ff1b..e33aedfa 100644 --- a/ScreenPlayWidget/src/spwidgetmainwindow.h +++ b/ScreenPlayWidget/src/spwidgetmainwindow.h @@ -14,7 +14,11 @@ #include #include #include +#ifdef Q_OS_WIN #include +#else +typedef long HWND; +#endif class SPWidgetmainwindow : public QWindow { Q_OBJECT