mirror of
https://github.com/sinbad/StevesUEHelpers.git
synced 2025-02-23 09:35:25 +00:00
Fix runtime assert in dedicated server build #5
This commit is contained in:
parent
8871361a77
commit
b56d5fa42c
@ -15,20 +15,26 @@
|
||||
void UStevesGameSubsystem::Initialize(FSubsystemCollectionBase& Collection)
|
||||
{
|
||||
Super::Initialize(Collection);
|
||||
|
||||
#if !UE_SERVER
|
||||
CreateInputDetector();
|
||||
InitTheme();
|
||||
InitForegroundCheck();
|
||||
#endif
|
||||
}
|
||||
|
||||
void UStevesGameSubsystem::Deinitialize()
|
||||
{
|
||||
Super::Deinitialize();
|
||||
#if !UE_SERVER
|
||||
DestroyInputDetector();
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
void UStevesGameSubsystem::CreateInputDetector()
|
||||
{
|
||||
#if !UE_SERVER
|
||||
if (!InputDetector.IsValid())
|
||||
{
|
||||
InputDetector = MakeShareable(new FInputModeDetector());
|
||||
@ -38,16 +44,18 @@ void UStevesGameSubsystem::CreateInputDetector()
|
||||
InputDetector->OnButtonInputModeChanged.BindUObject(this, &UStevesGameSubsystem::OnButtonInputDetectorModeChanged);
|
||||
InputDetector->OnAxisInputModeChanged.BindUObject(this, &UStevesGameSubsystem::OnAxisInputDetectorModeChanged);
|
||||
}
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
void UStevesGameSubsystem::DestroyInputDetector()
|
||||
{
|
||||
#if !UE_SERVER
|
||||
if (InputDetector.IsValid())
|
||||
{
|
||||
FSlateApplication::Get().UnregisterInputPreProcessor(InputDetector);
|
||||
InputDetector.Reset();
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
void UStevesGameSubsystem::InitTheme()
|
||||
|
Loading…
x
Reference in New Issue
Block a user