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