You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
Fix bad #ifndef and comment in InputDevice headers Partially from PR #940: Export input device to allow game input device plugins (Contributed by lion03) [CL 2484846 by Marc Audy in Main branch]
55 lines
1.5 KiB
C++
55 lines
1.5 KiB
C++
// Copyright 1998-2015 Epic Games, Inc. All Rights Reserved.
|
|
|
|
#pragma once
|
|
|
|
#include "ModuleInterface.h"
|
|
#include "ModuleManager.h" // For inline LoadModuleChecked()
|
|
#include "Runtime/Core/Public/Features/IModularFeatures.h"
|
|
|
|
|
|
/**
|
|
* The public interface of the InputDeviceModule
|
|
*/
|
|
class IInputDeviceModule : public IModuleInterface, public IModularFeature
|
|
{
|
|
public:
|
|
static FName GetModularFeatureName()
|
|
{
|
|
static FName FeatureName = FName(TEXT("InputDevice"));
|
|
return FeatureName;
|
|
}
|
|
|
|
virtual void StartupModule() override
|
|
{
|
|
IModularFeatures::Get().RegisterModularFeature( GetModularFeatureName(), this );
|
|
}
|
|
|
|
/**
|
|
* Singleton-like access to IMovieSceneCore
|
|
*
|
|
* @return Returns IInputDeviceModule singleton instance, loading the module on demand if needed
|
|
*/
|
|
static inline IInputDeviceModule& Get()
|
|
{
|
|
return FModuleManager::LoadModuleChecked< IInputDeviceModule >( "InputDevice" );
|
|
}
|
|
|
|
/**
|
|
* Checks to see if this module is loaded and ready. It is only valid to call Get() if IsAvailable() returns true.
|
|
*
|
|
* @return True if the module is loaded and ready to use
|
|
*/
|
|
static inline bool IsAvailable()
|
|
{
|
|
return FModuleManager::Get().IsModuleLoaded( "InputDevice" );
|
|
}
|
|
|
|
/**
|
|
* Attempts to create a new head tracking device interface
|
|
*
|
|
* @return Interface to the new head tracking device, if we were able to successfully create one
|
|
*/
|
|
virtual TSharedPtr< class IInputDevice > CreateInputDevice(const TSharedRef< FGenericApplicationMessageHandler >& InMessageHandler) = 0;
|
|
|
|
};
|