From c505561118f2029efb3149ee24c4e0953ef6104f Mon Sep 17 00:00:00 2001 From: Ari Vuollet Date: Sun, 26 Mar 2023 13:06:05 +0300 Subject: [PATCH] Remove extra sleep when Editor is not focused The engine is already sleeping the extra time between frames --- Source/Editor/Editor.cpp | 6 ------ 1 file changed, 6 deletions(-) diff --git a/Source/Editor/Editor.cpp b/Source/Editor/Editor.cpp index 0456e28a4..fb6d53c4c 100644 --- a/Source/Editor/Editor.cpp +++ b/Source/Editor/Editor.cpp @@ -696,12 +696,6 @@ void EditorImpl::OnUpdate() // Boost our priority back to normal Platform::SetThreadPriority(ThreadPriority::Normal); } - if (!hasFocus) - { - // Sleep for a bit to not eat up all CPU time - PROFILE_CPU_NAMED("Sleep"); - Platform::Sleep(5); - } HasFocus = hasFocus; }