Fixed get_fps()

This commit is contained in:
JeremyStar™ 2023-06-26 20:14:38 +02:00
parent 41e76d5bb0
commit e0649b43c4

View file

@ -68,11 +68,11 @@ 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.") 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" return "INVALID_MODE"
func get_fps() -> String: func get_fps() -> float:
if str(delta) == "0": if str(delta) == "0":
game_fps = INF return INF
else: else:
game_fps = 1/delta return 1/delta
func get_rendertime() -> float: func get_rendertime() -> float:
return Performance.get_monitor(Performance.TIME_PROCESS) return Performance.get_monitor(Performance.TIME_PROCESS)