Files
devin doucette 90200ff6d0 DDC: Fixes related to the use of OIDC functionality from DesktopPlatform
- Fixed a crash when HttpCacheStore is used without DesktopPlatform.
- Fixed GetOidcAccessToken and GetOidcTokenStatus failing for targets with no Intermediate directory.
- Added DesktopPlatform to DerivedDataTool to allow it to use HttpCacheStore with OIDC.

#rb Zousar.Shaker
[FYI] Dan.Engelbrecht

[CL 25072527 by devin doucette in ue5-main branch]
2023-04-17 15:23:51 -04:00

38 lines
944 B
C++

// Copyright Epic Games, Inc. All Rights Reserved.
#pragma once
#include "CoreMinimal.h"
#include "IDesktopPlatform.h"
#include "Modules/ModuleInterface.h"
#include "Modules/ModuleManager.h"
class IDesktopPlatform;
class FDesktopPlatformModule : public IModuleInterface
{
public:
virtual void StartupModule();
virtual void ShutdownModule();
static IDesktopPlatform* Get()
{
FDesktopPlatformModule& DesktopPlatformModule = FModuleManager::Get().LoadModuleChecked<FDesktopPlatformModule>("DesktopPlatform");
return DesktopPlatformModule.GetSingleton();
}
static IDesktopPlatform* TryGet()
{
if (FDesktopPlatformModule* DesktopPlatformModule = FModuleManager::Get().LoadModulePtr<FDesktopPlatformModule>("DesktopPlatform"))
{
return DesktopPlatformModule->GetSingleton();
}
return nullptr;
}
private:
virtual IDesktopPlatform* GetSingleton() const { return DesktopPlatform; }
IDesktopPlatform* DesktopPlatform;
};