Files
UnrealEngineUWP/Engine/Source/Developer/Windows/WindowsTargetPlatform/Private/WindowsTargetPlatformModule.cpp
Josh Adams 5f27a8dbcb [Upgrade Notes Critical! Licensee build scripts and DeviceProfiles may need updating]
- Formalizing all TargetPlatforms to have a Client version, rename WindowsNoEditor to Windows, and removing DDPI specification of TargetPlatforms, and generate them programmatically
- Updated names DeviceProfiles and Build scripts, as above
- Some PlatformInfo class cleanup
- Added a TNonDesktopTargetPlatformBase class to make most TargetPlatforms simpler
- Added "No Compiled Support" to the Turnkey LaunchOn menu when the TargetPlatforms aren't compiled in (to show that even if you install an SDK, you will need to compile before you can LaunchOn)\
- Starting the transition away from PlatformInfo::FPlatformInfo to FDDPI

[CL 13966487 by Josh Adams in ue5-main branch]
2020-07-29 16:19:10 -04:00

79 lines
2.1 KiB
C++

// Copyright Epic Games, Inc. All Rights Reserved.
#include "CoreMinimal.h"
#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:
virtual void GetTargetPlatforms(TArray<ITargetPlatform*>& TargetPlatforms) override
{
// Game TP
TargetPlatforms.Add(new TGenericWindowsTargetPlatform<false, false, false>());
// Editor TP
TargetPlatforms.Add(new TGenericWindowsTargetPlatform<true, false, false>());
// Server TP
TargetPlatforms.Add(new TGenericWindowsTargetPlatform<false, true, false>());
// 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
ISettingsModule* SettingsModule = FModuleManager::GetModulePtr<ISettingsModule>("Settings");
}
};
#undef LOCTEXT_NAMESPACE
IMPLEMENT_MODULE(FWindowsTargetPlatformModule, WindowsTargetPlatform);