You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
40 lines
994 B
C++
40 lines
994 B
C++
// Copyright 1998-2017 Epic Games, Inc. All Rights Reserved.
|
|
|
|
#include "CoreMinimal.h"
|
|
#include "OculusInput.h"
|
|
#include "IOculusInputPlugin.h"
|
|
#include "IOculusRiftPlugin.h"
|
|
|
|
#if OCULUS_INPUT_SUPPORTED_PLATFORMS
|
|
|
|
#define LOCTEXT_NAMESPACE "OculusInput"
|
|
|
|
class FOculusInputModule : public IOculusInputPlugin
|
|
{
|
|
// IInputDeviceModule overrides
|
|
virtual TSharedPtr< class IInputDevice > CreateInputDevice( const TSharedRef< FGenericApplicationMessageHandler >& InMessageHandler ) override
|
|
{
|
|
if (IOculusRiftPlugin::IsAvailable())
|
|
{
|
|
return TSharedPtr< class IInputDevice >(new FOculusInput(InMessageHandler));
|
|
}
|
|
else
|
|
{
|
|
UE_LOG(LogOcInput, Warning, TEXT("OculusInput plugin enabled, but OculusRift plugin is not available."));
|
|
return nullptr;
|
|
}
|
|
|
|
}
|
|
};
|
|
|
|
#else // OCULUS_INPUT_SUPPORTED_PLATFORMS
|
|
|
|
class FOculusInputModule : public FDefaultModuleImpl
|
|
{
|
|
};
|
|
|
|
#undef LOCTEXT_NAMESPACE
|
|
#endif // OCULUS_INPUT_SUPPORTED_PLATFORMS
|
|
|
|
IMPLEMENT_MODULE( FOculusInputModule, OculusInput )
|