Don't allow negative fps calculation in UI

This commit is contained in:
n00mkrad
2022-04-29 15:47:46 +02:00
parent 390e80ef89
commit 4108875e0b

View File

@@ -100,7 +100,7 @@ namespace Flowframes.Ui
Program.mainForm.SetProgress(percent);
float generousTime = ((AiProcess.processTime.ElapsedMilliseconds - AiProcess.lastStartupTimeMs) / 1000f);
float fps = (float)frames / generousTime;
float fps = ((float)frames / generousTime).Clamp(0, 9999);
string fpsIn = (fps / currentFactor).ToString("0.00");
string fpsOut = fps.ToString("0.00");