Skip to content

Commit

Permalink
Merge pull request #56 from CreativeCrowd/master
Browse files Browse the repository at this point in the history
Wrapped usage of windows types and replaced microsoft only types and functions
  • Loading branch information
EmilRosenquist authored Jun 23, 2022
2 parents 0ba5d43 + 301faf9 commit a38652d
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 5 deletions.
4 changes: 2 additions & 2 deletions Qualisys/QTMConnectLiveLink/QTMConnectLiveLink.uplugin
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"Win64"
],
"BlacklistPlatforms":[
"Android","Linux","PS4","HTML5","Mac","IOS","XBoxOne"
"Android","Linux","Mac","IOS"
]
},
{
Expand All @@ -32,7 +32,7 @@
"Win64"
],
"BlacklistPlatforms":[
"Android","Linux","PS4","HTML5","Mac","IOS","XBoxOne"
"Android","Linux","Mac","IOS"
]
}
],
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#include "QTMConnectLiveLinkLog.h"

DEFINE_LOG_CATEGORY(QTMConnectLiveLinkLog)


Original file line number Diff line number Diff line change
@@ -1,18 +1,23 @@
// QTM Connect For Unreal. Copyright 2018-2022 Qualisys
//
#include "QTMConnectLiveLinkSource.h"
#include "QTMConnectLiveLinkLog.h"
#include "ILiveLinkClient.h"
#include "LiveLinkTypes.h"
#include "Roles/LiveLinkAnimationRole.h"
#include "Roles/LiveLinkTransformRole.h"
#include "Roles/LiveLinkTransformTypes.h"
#include "Roles/LiveLinkBasicRole.h"

#if PLATFORM_WINDOWS
#include "Windows/AllowWindowsPlatformTypes.h"
#include "Windows/AllowWindowsPlatformAtomics.h"
#endif
#include "RTProtocol.h"
#if PLATFORM_WINDOWS
#include "Windows/HideWindowsPlatformAtomics.h"
#include "Windows/HideWindowsPlatformTypes.h"
#endif
#include "CommonFrameRates.h"

#include <string>
Expand Down Expand Up @@ -265,7 +270,7 @@ uint32 FQTMConnectLiveLinkSource::Run()
if (mRTProtocol->GetDiscoverResponse(0, addr, basePort, message))
{
char serverAddr[40];
sprintf_s(serverAddr, "%d.%d.%d.%d", 0xff & addr, 0xff & (addr >> 8), 0xff & (addr >> 16), 0xff & (addr >> 24));
UE_LOG(QTMConnectLiveLinkLog,Log,TEXT("%d.%d.%d.%d"),0xff & addr, 0xff & (addr >> 8), 0xff & (addr >> 16), 0xff & (addr >> 24));
serverAddress = serverAddr;
}
}
Expand Down Expand Up @@ -446,7 +451,7 @@ uint32 FQTMConnectLiveLinkSource::Run()
}
case CRTPacket::TimecodeCamerTime:
{
unsigned __int64 cameraTime;
uint64 cameraTime; //on windows platforms uint64 resolves to unsigned long long which is synonymous with unsigned __int64
packet->GetTimecodeCameraTime(cameraTime);
const auto seconds = (cameraTime / 10000000);
ConstructLiveLinkTimeCode(timecodeFrequency, seconds, sceneTime);
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#pragma once


DECLARE_LOG_CATEGORY_EXTERN(QTMConnectLiveLinkLog,Log,All)
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,18 @@
#include "MessageEndpoint.h"
#include "IMessageContext.h"
#include "HAL/ThreadSafeBool.h"
#include "HAL/Runnable.h"
#include "HAL/RunnableThread.h"

#include "Networking.h"
#include "Sockets.h"
#include "SocketSubsystem.h"
#include <memory>
#include <vector>
#include <unordered_map>




class ILiveLinkClient;
class CRTProtocol;

Expand Down

0 comments on commit a38652d

Please sign in to comment.