Legacy cleanup, part 2 (#3659)
* Legacy cleanup, part 2 There are still things that can be removed, those will be likely done in part three: `The Return of the Cleanup` :) Signed-off-by: nemerle <96597+nemerle@users.noreply.github.com> * Fix windows build Somehow there were some unfixed errors from enabled warnings? I'm unsure if I've pulled repo in unstable state, or those were somehow missed. Signed-off-by: nemerle <96597+nemerle@users.noreply.github.com>
This commit is contained in:
@@ -20,6 +20,7 @@
|
||||
#include <CryPath.h>
|
||||
#include <CrySystemBus.h>
|
||||
#include <CryCommon/IFont.h>
|
||||
#include <CryCommon/MiniQueue.h>
|
||||
#include <AzFramework/API/ApplicationAPI.h>
|
||||
#include <AzFramework/API/ApplicationAPI_Platform.h>
|
||||
#include <AzFramework/Input/Devices/Keyboard/InputDeviceKeyboard.h>
|
||||
@@ -28,6 +29,7 @@
|
||||
#include <AzCore/Debug/Trace.h>
|
||||
#include <AzCore/Debug/IEventLogger.h>
|
||||
#include <AzCore/Interface/Interface.h>
|
||||
#include <AzCore/std/algorithm.h>
|
||||
#include <AzFramework/Logging/MissingAssetLogger.h>
|
||||
#include <AzFramework/Entity/EntityDebugDisplayBus.h>
|
||||
#include <AzCore/Interface/Interface.h>
|
||||
@@ -641,7 +643,7 @@ void CSystem::SleepIfNeeded()
|
||||
allowStallCatchup = true;
|
||||
|
||||
float totalElapsed = (now - prevNow.Front()).GetSeconds();
|
||||
float wantSleepTime = CLAMP(minTime * (prevNow.Size() - 1) - totalElapsed, 0, (minTime - elapsed) * 0.9f);
|
||||
float wantSleepTime = AZStd::clamp(minTime * (prevNow.Size() - 1) - totalElapsed, 0.0f, (minTime - elapsed) * 0.9f);
|
||||
static float sleepTime = 0;
|
||||
sleepTime = (15 * sleepTime + wantSleepTime) / 16;
|
||||
int sleepMS = (int)(1000.0f * sleepTime + 0.5f);
|
||||
|
||||
Reference in New Issue
Block a user