You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
First part of TargetPlatform(TP) refactor into TargetPlatformSettings(TPS) and TargetPlatformControls(TPC)
TPS doesn't need SDK and will be used to get info about the platform TPC requires SDK AndroidTP has been converted to the new system #jira UE-200883 #rb Jack.Porter [CL 30963885 by florin pascu in ue5-main branch]
This commit is contained in:
@@ -7,71 +7,26 @@
|
||||
#include "Common/TargetPlatformBase.h"
|
||||
#include "Interfaces/IAndroidDeviceDetection.h"
|
||||
#include "Interfaces/IAndroidDeviceDetectionModule.h"
|
||||
#include "AndroidTargetDevice.h"
|
||||
#include "AndroidTargetPlatform.h"
|
||||
#include "IAndroidTargetPlatformModule.h"
|
||||
|
||||
#define LOCTEXT_NAMESPACE "FAndroidTargetPlatformModule"
|
||||
|
||||
/**
|
||||
* Module for the Android target platform.
|
||||
*/
|
||||
class FAndroidTargetPlatformModule : public IAndroidTargetPlatformModule
|
||||
class FAndroidTargetPlatformModule : public ITargetPlatformModule
|
||||
{
|
||||
public:
|
||||
|
||||
virtual void GetTargetPlatforms(TArray<ITargetPlatform*>& TargetPlatforms) override
|
||||
virtual void GetTargetPlatforms(TArray<ITargetPlatform*>& TargetPlatforms)
|
||||
{
|
||||
if (FAndroidTargetPlatform::IsUsable())
|
||||
{
|
||||
// ensure this is only called once
|
||||
check( SinglePlatforms.IsEmpty() );
|
||||
|
||||
for (int32 Type = 0; Type < 2; Type++)
|
||||
{
|
||||
bool bIsClient = Type == 1;
|
||||
|
||||
// flavorless must come first
|
||||
// "flavorless" (aka "vanilla") Android is not well defined and not actually usable
|
||||
// but Editor wants to see it in the platform list
|
||||
SinglePlatforms.Add(new FAndroidTargetPlatform(bIsClient, nullptr));
|
||||
SinglePlatforms.Add(new FAndroid_ASTCTargetPlatform(bIsClient));
|
||||
SinglePlatforms.Add(new FAndroid_DXTTargetPlatform(bIsClient));
|
||||
SinglePlatforms.Add(new FAndroid_ETC2TargetPlatform(bIsClient));
|
||||
|
||||
// these are used in NotifyMultiSelectedFormatsChanged, so track in another array
|
||||
MultiPlatforms.Add(new FAndroid_MultiTargetPlatform(bIsClient));
|
||||
}
|
||||
|
||||
// join the single and the multi into one
|
||||
TargetPlatforms.Append(SinglePlatforms);
|
||||
TargetPlatforms.Append(MultiPlatforms);
|
||||
|
||||
// set up the multi platforms now that we have all the other platforms ready to go
|
||||
NotifyMultiSelectedFormatsChanged();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
virtual void NotifyMultiSelectedFormatsChanged() override
|
||||
virtual void GetTargetPlatforms(TArray<ITargetPlatform*>& TargetPlatforms, TArray<ITargetPlatformSettings*> TargetPlatformSettings, TArray<ITargetPlatformControls*> TargetPlatformControls) override
|
||||
{
|
||||
for (FAndroid_MultiTargetPlatform* TP : MultiPlatforms)
|
||||
for (ITargetPlatformControls* TargetPlatformControlsIt : TargetPlatformControls)
|
||||
{
|
||||
TP->LoadFormats(SinglePlatforms);
|
||||
TargetPlatforms.Add(new FTargetPlatformMerged(TargetPlatformControlsIt->GetTargetPlatformSettings(), TargetPlatformControlsIt));
|
||||
}
|
||||
// @todo multi needs to be passed this event!
|
||||
}
|
||||
|
||||
|
||||
private:
|
||||
|
||||
/** Holds the specific types of target platforms for NotifyMultiSelectedFormatsChanged */
|
||||
TArray<FAndroidTargetPlatform*> SinglePlatforms;
|
||||
TArray<FAndroid_MultiTargetPlatform*> MultiPlatforms;
|
||||
};
|
||||
|
||||
|
||||
#undef LOCTEXT_NAMESPACE
|
||||
|
||||
|
||||
IMPLEMENT_MODULE( FAndroidTargetPlatformModule, AndroidTargetPlatform);
|
||||
|
||||
Reference in New Issue
Block a user