From 2d728f1f26c04323a1b3fa16acd72a0b52fbcc2b Mon Sep 17 00:00:00 2001 From: Sebastian Date: Sat, 15 Jun 2019 13:37:11 +0100 Subject: [PATCH] Removed from FImGuiModuleManager custom check for a game thread as both reasons to have it are not relevant any more. Current implementation of the IsInGameThread() doesn't make exceptions for a loading thread and lazy initialization of the Unreal resources ensures that plugin doesn't do any work before the game starts. --- Source/ImGui/Private/ImGuiModuleManager.cpp | 9 +-------- Source/ImGui/Private/ImGuiModuleManager.h | 2 -- 2 files changed, 1 insertion(+), 10 deletions(-) diff --git a/Source/ImGui/Private/ImGuiModuleManager.cpp b/Source/ImGui/Private/ImGuiModuleManager.cpp index f958ab0..171dec7 100644 --- a/Source/ImGui/Private/ImGuiModuleManager.cpp +++ b/Source/ImGui/Private/ImGuiModuleManager.cpp @@ -147,16 +147,9 @@ void FImGuiModuleManager::ReleaseTickInitializer() } } -bool FImGuiModuleManager::IsInUpdateThread() -{ - // We can get ticks from the Game thread and Slate loading thread. In both cases IsInGameThread() is true, so we - // need to make additional test to filter out loading thread. - return IsInGameThread() && !IsInSlateThread(); -} - void FImGuiModuleManager::Tick(float DeltaSeconds) { - if (IsInUpdateThread()) + if (IsInGameThread()) { // Update context manager to advance all ImGui contexts to the next frame. ContextManager.Tick(DeltaSeconds); diff --git a/Source/ImGui/Private/ImGuiModuleManager.h b/Source/ImGui/Private/ImGuiModuleManager.h index 4409318..7b42450 100644 --- a/Source/ImGui/Private/ImGuiModuleManager.h +++ b/Source/ImGui/Private/ImGuiModuleManager.h @@ -54,8 +54,6 @@ private: void CreateTickInitializer(); void ReleaseTickInitializer(); - bool IsInUpdateThread(); - void Tick(float DeltaSeconds); void OnViewportCreated();