Skip to content

Commit

Permalink
Port C++ code
Browse files Browse the repository at this point in the history
Added the windows headers, as winapi headers only work if included in a
certain order; previously, this was enforced by the PCH.
  • Loading branch information
fredemmott committed Jun 7, 2020
1 parent c3ddaa0 commit 5ea8900
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Sources/MyStreamDeckPlugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#include "Windows/CpuUsageHelper.h"
#endif

#include "Common/ESDConnectionManager.h"
#include <StreamDeckSDK/ESDConnectionManager.h>

class CallBackTimer
{
Expand Down
6 changes: 5 additions & 1 deletion Sources/MyStreamDeckPlugin.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,12 @@
**/
//==============================================================================

#include "Common/ESDBasePlugin.h"
#include <StreamDeckSDK/ESDBasePlugin.h>

#include <mutex>
#include <set>

using json = nlohmann::json;

class CpuUsageHelper;
class CallBackTimer;
Expand Down
5 changes: 4 additions & 1 deletion Sources/Windows/CpuUsageHelper.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@

#pragma once
#pragma comment(lib, "Pdh.lib")
#include "pdh.h"

#include <winsock2.h>
#include <windows.h>
#include <pdh.h>

class CpuUsageHelper
{
Expand Down
2 changes: 2 additions & 0 deletions Sources/macOS/CpuUsageHelper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@

#include "CpuUsageHelper.h"

#include <cmath>

CpuUsageHelper::CpuUsageHelper()
{
int mib[2U] = { CTL_HW, HW_NCPU };
Expand Down

0 comments on commit 5ea8900

Please sign in to comment.