Files
UnrealEngineUWP/Engine/Source/Developer/Mac/MacServerTargetPlatform/Private/MacServerTargetPlatformModule.cpp
Josh Adams 7efc6ca8c4 - Merged from FN/Main to 4.23:
- 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

[CL 8031412 by Josh Adams in 4.23 branch]
2019-08-14 11:13:59 -04:00

43 lines
1.1 KiB
C++

// Copyright 1998-2019 Epic Games, Inc. All Rights Reserved.
/*=============================================================================
MacServerTargetPlatformModule.cpp: Implements the FMacServerTargetPlatformModule class.
=============================================================================*/
#include "CoreMinimal.h"
#include "GenericMacTargetPlatform.h"
#include "Interfaces/ITargetPlatformModule.h"
#include "Modules/ModuleManager.h"
/**
* Holds the target platform singleton.
*/
static ITargetPlatform* Singleton = NULL;
/**
* Module for the Mac target platform (without editor).
*/
class FMacServerTargetPlatformModule
: public ITargetPlatformModule
{
public:
virtual ~FMacServerTargetPlatformModule( )
{
Singleton = NULL;
}
virtual ITargetPlatform* GetTargetPlatform( ) override
{
if (Singleton == NULL&& TGenericMacTargetPlatform<false, true, false>::IsUsable())
{
Singleton = new TGenericMacTargetPlatform<false, true, false>();
}
return Singleton;
}
};
IMPLEMENT_MODULE(FMacServerTargetPlatformModule, MacServerTargetPlatform);