Files
UnrealEngineUWP/Engine/Source/Developer/IOS/IOSTargetPlatform/Private/IOSTargetPlatformModule.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

51 lines
1.0 KiB
C++

// Copyright 1998-2019 Epic Games, Inc. All Rights Reserved.
#include "IOSTargetPlatform.h"
#include "Interfaces/ITargetPlatformModule.h"
#include "Modules/ModuleManager.h"
/**
* Module for iOS as a target platform
*/
class FIOSTargetPlatformModule : public ITargetPlatformModule
{
public:
/** Destructor. */
~FIOSTargetPlatformModule()
{
for (ITargetPlatform* TP : TargetPlatforms)
{
delete TP;
}
TargetPlatforms.Empty();
}
//~ ITargetPlatformModule interface
virtual TArray<ITargetPlatform*> GetTargetPlatforms() override
{
if (TargetPlatforms.Num() == 0 && FIOSTargetPlatform::IsUsable())
{
TargetPlatforms.Add(new FIOSTargetPlatform(false, true));
TargetPlatforms.Add(new FIOSTargetPlatform(false, false));
}
return TargetPlatforms;
}
//~ IModuleInterface interface
virtual void StartupModule() override { }
virtual void ShutdownModule() override { }
protected:
/** Holds the target platforms. */
TArray<ITargetPlatform*> TargetPlatforms;
};
IMPLEMENT_MODULE(FIOSTargetPlatformModule, IOSTargetPlatform);