You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
- 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]
39 lines
863 B
C++
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 FWindowsServerTargetPlatformModule
|
|
: public ITargetPlatformModule
|
|
{
|
|
public:
|
|
|
|
virtual ~FWindowsServerTargetPlatformModule( )
|
|
{
|
|
Singleton = nullptr;
|
|
}
|
|
|
|
virtual ITargetPlatform* GetTargetPlatform( )
|
|
{
|
|
if (Singleton == nullptr && TGenericWindowsTargetPlatform<false, true, false>::IsUsable())
|
|
{
|
|
Singleton = new TGenericWindowsTargetPlatform<false, true, false>();
|
|
}
|
|
|
|
return Singleton;
|
|
}
|
|
};
|
|
|
|
|
|
IMPLEMENT_MODULE(FWindowsServerTargetPlatformModule, WindowsServerTargetPlatform);
|