Files
UnrealEngineUWP/Engine/Source/Developer/Windows/WindowsTargetPlatform/Private/WindowsTargetPlatformModule.cpp
T

79 lines
2.1 KiB
C++
Raw Normal View History

2019-12-26 15:32:37 -05:00
// Copyright Epic Games, Inc. All Rights Reserved.
#include "CoreMinimal.h"
2014-10-27 07:53:18 -04:00
#include "ISettingsModule.h"
#include "Interfaces/ITargetPlatformModule.h"
#include "GenericWindowsTargetPlatform.h"
#include "Modules/ModuleManager.h"
#include "UObject/Package.h"
#include "UObject/WeakObjectPtr.h"
#define LOCTEXT_NAMESPACE "FWindowsTargetPlatformModule"
/**
* Implements the Windows target platform module.
*/
class FWindowsTargetPlatformModule
: public ITargetPlatformModule
{
public:
// this is an example of a hotfix, declared here for no particular reason. Once we have other examples, it can be deleted.
#if 0
void HotfixTest( void *InPayload, int PayloadSize )
{
check(sizeof(FTestHotFixPayload) == PayloadSize);
FTestHotFixPayload* Payload = (FTestHotFixPayload*)InPayload;
UE_LOG(LogTemp, Log, TEXT("Hotfix Test %s"), *Payload->Message);
Payload->Result = Payload->ValueToReturn;
}
#endif
public:
2020-05-22 09:57:29 -04:00
virtual void GetTargetPlatforms(TArray<ITargetPlatform*>& TargetPlatforms) override
{
// Game TP
TargetPlatforms.Add(new TGenericWindowsTargetPlatform<false, false, false>());
2020-05-22 09:57:29 -04:00
// Editor TP
TargetPlatforms.Add(new TGenericWindowsTargetPlatform<true, false, false>());
2020-05-22 09:57:29 -04:00
// Server TP
TargetPlatforms.Add(new TGenericWindowsTargetPlatform<false, true, false>());
2020-05-22 09:57:29 -04:00
// Client TP
TargetPlatforms.Add(new TGenericWindowsTargetPlatform<false, false, true>());
}
public:
// IModuleInterface interface
virtual void StartupModule() override
{
// this is an example of a hotfix, declared here for no particular reason. Once we have other examples, it can be deleted.
#if 0
FCoreDelegates::GetHotfixDelegate(EHotfixDelegates::Test).BindRaw(this, &FWindowsTargetPlatformModule::HotfixTest);
#endif
}
virtual void ShutdownModule() override
{
// this is an example of a hotfix, declared here for no particular reason. Once we have other examples, it can be deleted.
#if 0
FCoreDelegates::GetHotfixDelegate(EHotfixDelegates::Test).Unbind();
#endif
2014-10-27 07:53:18 -04:00
ISettingsModule* SettingsModule = FModuleManager::GetModulePtr<ISettingsModule>("Settings");
}
2020-05-22 09:57:29 -04:00
};
2020-05-22 09:57:29 -04:00
#undef LOCTEXT_NAMESPACE
IMPLEMENT_MODULE(FWindowsTargetPlatformModule, WindowsTargetPlatform);