Add "flat" argument to wmgr.get_fps()

This commit is contained in:
JeremyStar™ 2023-07-08 20:41:59 +02:00
parent 7bca9910fb
commit 83c98e6b75

View file

@ -68,11 +68,14 @@ func get_mode() -> String:
Logger.error("wmgr","Failed to get window mode: The window mode id \"" + str(DisplayServer.window_get_mode()) + "\" is not known to CORE.")
return "INVALID_MODE"
func get_fps() -> float:
func get_fps(flat:bool = false) -> float:
if str(delta) == "0":
return INF
else:
return 1/delta
if flat:
return float(int(1/delta))
else:
return 1/delta
func get_rendertime() -> float:
return Performance.get_monitor(Performance.TIME_PROCESS)