1
0
mirror of https://gitlab.com/kelteseth/ScreenPlay.git synced 2024-11-07 03:22:33 +01:00

Disabled Windows only WinApi calls in sys info

This commit is contained in:
Dominik Louven 2018-11-26 20:38:23 +01:00
parent 3ab531877a
commit 53280d1a36
2 changed files with 8 additions and 3 deletions

View File

@ -9,8 +9,9 @@
#endif #endif
// https://github.com/rainmeter/rainmeter/blob/master/Library/MeasureCPU.cpp // https://github.com/rainmeter/rainmeter/blob/master/Library/MeasureCPU.cpp
#ifdef Q_OS_WIN
typedef LONG(WINAPI* FPNTQSI)(UINT, PVOID, ULONG, PULONG); typedef LONG(WINAPI* FPNTQSI)(UINT, PVOID, ULONG, PULONG);
#endif
class CPU : public QObject { class CPU : public QObject {
Q_OBJECT Q_OBJECT
@ -69,10 +70,10 @@ private:
double m_OldTime[2]; double m_OldTime[2];
static FPNTQSI c_NtQuerySystemInformation; //static FPNTQSI c_NtQuerySystemInformation;
static int c_NumOfProcessors; static int c_NumOfProcessors;
static ULONG c_BufferSize; //static ULONG c_BufferSize;
int m_tickRate = 500; int m_tickRate = 500;
QTimer m_updateTimer; QTimer m_updateTimer;
}; };

View File

@ -14,7 +14,11 @@
#include <QSharedPointer> #include <QSharedPointer>
#include <QString> #include <QString>
#include <QWindow> #include <QWindow>
#ifdef Q_OS_WIN
#include <qt_windows.h> #include <qt_windows.h>
#else
typedef long HWND;
#endif
class SPWidgetmainwindow : public QWindow { class SPWidgetmainwindow : public QWindow {
Q_OBJECT Q_OBJECT