Files
UnrealEngineUWP/Engine/Plugins/Runtime/OculusInput/Source/Private/OculusInputModule.cpp
Nick Whiting 31e4175868 Copying Dev-VR to Dev-Main
#lockdown nick.penwarden

[CL 2791734 by Nick Whiting in Main branch]
2015-12-05 02:42:09 -05:00

38 lines
924 B
C++

// Copyright 1998-2015 Epic Games, Inc. All Rights Reserved.
#include "OculusInput.h"
#include "IOculusInputPlugin.h"
#include "IOculusRiftPlugin.h"
#if USE_OVR_MOTION_SDK
#define LOCTEXT_NAMESPACE "OculusTouch"
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 // USE_OVR_MOTION_SDK
class FOculusInputModule : public FDefaultModuleImpl
{
};
#undef LOCTEXT_NAMESPACE
#endif // USE_OVR_MOTION_SDK
IMPLEMENT_MODULE( FOculusInputModule, OculusInput )