Files
UnrealEngineUWP/Engine/Source/Developer/Windows/WindowsClientTargetPlatform/Private/WindowsClientTargetPlatformModule.cpp
josh adams 3d282bf6e7 - Added early check before creating a TargetPlatform object if the PlatformInfo will be found (check a static function to see if it's usable before making it)
- Changed each platform's GetTargetPlatform[s] function
#rb none
#jira UE-78692
[FYI] bob.tellez


#ROBOMERGE-SOURCE: CL 7952099 via CL 7954770
#ROBOMERGE-BOT: (v393-7951996)

[CL 7954968 by josh adams in Main branch]
2019-08-12 18:12:07 -04:00

39 lines
863 B
C++

// Copyright 1998-2019 Epic Games, Inc. All Rights Reserved.
#include "CoreMinimal.h"
#include "Modules/ModuleManager.h"
#include "GenericWindowsTargetPlatform.h"
#include "Interfaces/ITargetPlatformModule.h"
/** Holds the target platform singleton. */
static ITargetPlatform* Singleton = nullptr;
/**
* Module for the Windows target platform as a server.
*/
class FWindowsClientTargetPlatformModule
: public ITargetPlatformModule
{
public:
virtual ~FWindowsClientTargetPlatformModule( )
{
Singleton = nullptr;
}
virtual ITargetPlatform* GetTargetPlatform( )
{
if (Singleton == nullptr && TGenericWindowsTargetPlatform<false, false, true>::IsUsable())
{
Singleton = new TGenericWindowsTargetPlatform<false, false, true>();
}
return Singleton;
}
};
IMPLEMENT_MODULE(FWindowsClientTargetPlatformModule, WindowsClientTargetPlatform);