Skip to content

Commit 5ea8900

Browse files
committed
Port C++ code
Added the windows headers, as winapi headers only work if included in a certain order; previously, this was enforced by the PCH.
1 parent c3ddaa0 commit 5ea8900

File tree

4 files changed

+12
-3
lines changed

4 files changed

+12
-3
lines changed

Sources/MyStreamDeckPlugin.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
#include "Windows/CpuUsageHelper.h"
2020
#endif
2121

22-
#include "Common/ESDConnectionManager.h"
22+
#include <StreamDeckSDK/ESDConnectionManager.h>
2323

2424
class CallBackTimer
2525
{

Sources/MyStreamDeckPlugin.h

+5-1
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,12 @@
1010
**/
1111
//==============================================================================
1212

13-
#include "Common/ESDBasePlugin.h"
13+
#include <StreamDeckSDK/ESDBasePlugin.h>
14+
1415
#include <mutex>
16+
#include <set>
17+
18+
using json = nlohmann::json;
1519

1620
class CpuUsageHelper;
1721
class CallBackTimer;

Sources/Windows/CpuUsageHelper.h

+4-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,10 @@
1212

1313
#pragma once
1414
#pragma comment(lib, "Pdh.lib")
15-
#include "pdh.h"
15+
16+
#include <winsock2.h>
17+
#include <windows.h>
18+
#include <pdh.h>
1619

1720
class CpuUsageHelper
1821
{

Sources/macOS/CpuUsageHelper.cpp

+2
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212

1313
#include "CpuUsageHelper.h"
1414

15+
#include <cmath>
16+
1517
CpuUsageHelper::CpuUsageHelper()
1618
{
1719
int mib[2U] = { CTL_HW, HW_NCPU };

0 commit comments

Comments
 (0)