Files
UnrealEngine/Engine/Plugins/Media/PixelStreaming2/Source/PixelStreaming2Input/Private/PixelStreaming2InputModule.cpp
2025-05-18 13:04:45 +08:00

40 lines
1.1 KiB
C++

// Copyright Epic Games, Inc. All Rights Reserved.
#include "PixelStreaming2InputModule.h"
#include "ApplicationWrapper.h"
#include "Framework/Application/SlateApplication.h"
#include "InputHandler.h"
#include "IPixelStreaming2HMDModule.h"
namespace UE::PixelStreaming2Input
{
void FPixelStreaming2InputModule::StartupModule()
{
if (!FSlateApplication::IsInitialized())
{
return;
}
InputDevice = FInputDevice::GetInputDevice();
IModularFeatures::Get().RegisterModularFeature(GetModularFeatureName(), this);
}
void FPixelStreaming2InputModule::ShutdownModule()
{
IModularFeatures::Get().UnregisterModularFeature(GetModularFeatureName(), this);
}
TSharedPtr<IPixelStreaming2InputHandler> FPixelStreaming2InputModule::CreateInputHandler()
{
return MakeShared<FPixelStreaming2InputHandler>();
}
TSharedPtr<IInputDevice> FPixelStreaming2InputModule::CreateInputDevice(const TSharedRef<FGenericApplicationMessageHandler>& InMessageHandler)
{
return InputDevice;
}
} // namespace UE::PixelStreaming2Input
IMPLEMENT_MODULE(UE::PixelStreaming2Input::FPixelStreaming2InputModule, PixelStreaming2Input)