Files
UnrealEngineUWP/Engine/Source/Developer/HTML5/HTML5TargetPlatform/Private/HTML5TargetPlatformModule.cpp
James Moran c5b4ca076e HTML5 SDK settings are now set via the Editor.
Android SDK path backslash duplication fix.
Fix for User inis not saving array properties correctly.

#codereview Ankit.Khare, Josh.Adams

[CL 2418611 by James Moran in Main branch]
2015-01-26 10:22:57 -05:00

88 lines
1.3 KiB
C++

// Copyright 1998-2015 Epic Games, Inc. All Rights Reserved.
#include "HTML5TargetPlatformPrivatePCH.h"
#include "ISettingsModule.h"
#include "ModuleManager.h"
#define LOCTEXT_NAMESPACE "FHTML5TargetPlatformModule"
// Holds the target platform singleton.
static ITargetPlatform* Singleton = NULL;
/**
* Module for the HTML5 target platform.
*/
class FHTML5TargetPlatformModule
: public IHTML5TargetPlatformModule
{
public:
/**
* Destructor.
*/
~FHTML5TargetPlatformModule( )
{
Singleton = NULL;
}
public:
// Begin ITargetPlatformModule interface
virtual ITargetPlatform* GetTargetPlatform( ) override
{
if (Singleton == NULL)
{
// finally, make the interface object
Singleton = new FHTML5TargetPlatform();
FString OutPath;
if (!Singleton->IsSdkInstalled(false, OutPath))
{
delete Singleton;
Singleton = NULL;
}
}
return Singleton;
}
// End ITargetPlatformModule interface
virtual void RefreshAvailableDevices() override
{
if (Singleton)
{
((FHTML5TargetPlatform*)Singleton)->RefreshAvailableDevices();
}
}
public:
// Begin IModuleInterface interface
virtual void StartupModule() override
{
}
virtual void ShutdownModule() override
{
}
// End IModuleInterface interface
private:
};
#undef LOCTEXT_NAMESPACE
IMPLEMENT_MODULE( FHTML5TargetPlatformModule, HTML5TargetPlatform);