Files
UnrealEngineUWP/Engine/Source/Developer/Linux/LinuxServerTargetPlatform/Private/LinuxServerTargetPlatformModule.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

47 lines
1.1 KiB
C++

// Copyright 1998-2019 Epic Games, Inc. All Rights Reserved.
/*=============================================================================
LinuxTargetPlatformModule.cpp: Implements the FAndroidTargetPlatformModule class.
=============================================================================*/
#include "CoreMinimal.h"
#include "Modules/ModuleManager.h"
#include "Interfaces/ITargetPlatformModule.h"
#include "LinuxTargetDevice.h"
#include "LinuxTargetPlatform.h"
/**
* Holds the target platform singleton.
*/
static ITargetPlatform* Singleton = NULL;
/**
* Module for the Android target platform.
*/
class FLinuxServerTargetPlatformModule
: public ITargetPlatformModule
{
public:
virtual ~FLinuxServerTargetPlatformModule( )
{
Singleton = NULL;
}
virtual ITargetPlatform* GetTargetPlatform( )
{
if (Singleton == NULL && TLinuxTargetPlatform<FLinuxPlatformProperties<false, false, false> >::IsUsable())
{
Singleton = new TLinuxTargetPlatform<FLinuxPlatformProperties<false, true, false> >();
}
return Singleton;
}
};
IMPLEMENT_MODULE( FLinuxServerTargetPlatformModule, LinuxServerTargetPlatform);