Add "flat" argument to wmgr.get_fps()
This commit is contained in:
parent
7bca9910fb
commit
83c98e6b75
1 changed files with 5 additions and 2 deletions
5
wmgr.gd
5
wmgr.gd
|
@ -68,9 +68,12 @@ 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:
|
||||
if flat:
|
||||
return float(int(1/delta))
|
||||
else:
|
||||
return 1/delta
|
||||
|
||||
|
|
Loading…
Reference in a new issue