2019-12-26 15:32:37 -05:00
|
|
|
// Copyright Epic Games, Inc. All Rights Reserved.
|
2014-03-14 14:13:41 -04:00
|
|
|
|
2017-06-09 17:44:13 -04:00
|
|
|
#include "CoreMinimal.h"
|
2014-10-27 07:53:18 -04:00
|
|
|
#include "ISettingsModule.h"
|
2016-11-23 15:48:37 -05:00
|
|
|
#include "Interfaces/ITargetPlatformModule.h"
|
|
|
|
|
#include "GenericWindowsTargetPlatform.h"
|
2018-01-20 11:19:29 -05:00
|
|
|
#include "Modules/ModuleManager.h"
|
2016-11-23 15:48:37 -05:00
|
|
|
#include "UObject/Package.h"
|
|
|
|
|
#include "UObject/WeakObjectPtr.h"
|
2014-03-14 14:13:41 -04:00
|
|
|
|
|
|
|
|
#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
|
2014-08-20 21:10:29 -04:00
|
|
|
void HotfixTest( void *InPayload, int PayloadSize )
|
2014-03-14 14:13:41 -04:00
|
|
|
{
|
|
|
|
|
check(sizeof(FTestHotFixPayload) == PayloadSize);
|
|
|
|
|
|
|
|
|
|
FTestHotFixPayload* Payload = (FTestHotFixPayload*)InPayload;
|
|
|
|
|
UE_LOG(LogTemp, Log, TEXT("Hotfix Test %s"), *Payload->Message);
|
|
|
|
|
Payload->Result = Payload->ValueToReturn;
|
|
|
|
|
}
|
|
|
|
|
#endif
|
2014-08-20 21:10:29 -04:00
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
|
2020-05-22 09:57:29 -04:00
|
|
|
virtual void GetTargetPlatforms(TArray<ITargetPlatform*>& TargetPlatforms) override
|
2014-08-20 21:10:29 -04:00
|
|
|
{
|
2020-07-29 16:19:10 -04:00
|
|
|
// Game TP
|
|
|
|
|
TargetPlatforms.Add(new TGenericWindowsTargetPlatform<false, false, false>());
|
2020-05-22 09:57:29 -04:00
|
|
|
// Editor TP
|
2020-07-29 16:19:10 -04:00
|
|
|
TargetPlatforms.Add(new TGenericWindowsTargetPlatform<true, false, false>());
|
2020-05-22 09:57:29 -04:00
|
|
|
// Server TP
|
2020-07-29 16:19:10 -04:00
|
|
|
TargetPlatforms.Add(new TGenericWindowsTargetPlatform<false, true, false>());
|
2020-05-22 09:57:29 -04:00
|
|
|
// Client TP
|
2020-07-29 16:19:10 -04:00
|
|
|
TargetPlatforms.Add(new TGenericWindowsTargetPlatform<false, false, true>());
|
2014-08-20 21:10:29 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
|
|
|
|
|
// IModuleInterface interface
|
2014-03-14 14:13:41 -04:00
|
|
|
|
2014-06-13 06:14:46 -04:00
|
|
|
virtual void StartupModule() override
|
2014-03-14 14:13:41 -04:00
|
|
|
{
|
|
|
|
|
// 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
|
|
|
|
|
}
|
|
|
|
|
|
2014-06-13 06:14:46 -04:00
|
|
|
virtual void ShutdownModule() override
|
2014-03-14 14:13:41 -04:00
|
|
|
{
|
|
|
|
|
// 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");
|
2014-03-14 14:13:41 -04:00
|
|
|
}
|
2020-05-22 09:57:29 -04:00
|
|
|
|
2014-03-14 14:13:41 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
2020-05-22 09:57:29 -04:00
|
|
|
|
2014-03-14 14:13:41 -04:00
|
|
|
#undef LOCTEXT_NAMESPACE
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
IMPLEMENT_MODULE(FWindowsTargetPlatformModule, WindowsTargetPlatform);
|