Fix uninitialized read of Engine::dt early after startup again
As once done ina2c7242c7c
. Broken inc725894abd
.
This commit is contained in:
parent
d4784b2516
commit
986de1066d
@ -41,6 +41,15 @@ void Engine::SetFpsLimit(FpsLimit newFpsLimit)
|
|||||||
{
|
{
|
||||||
fpsLimit = newFpsLimit;
|
fpsLimit = newFpsLimit;
|
||||||
::SetFpsLimit(fpsLimit);
|
::SetFpsLimit(fpsLimit);
|
||||||
|
// Populate dt with whatever that makes any sort of sense.
|
||||||
|
if (auto *explicitFpsLimit = std::get_if<FpsLimitExplicit>(&fpsLimit))
|
||||||
|
{
|
||||||
|
SetFps(explicitFpsLimit->value);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
SetFps(1);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Engine::Begin()
|
void Engine::Begin()
|
||||||
|
Loading…
Reference in New Issue
Block a user