浏览代码

Merge pull request #37742 from madmiraal/fix-engine-get_target_fps

Fix Engine get_target_fps() returning float instead of int.
Rémi Verschelde 5 年之前
父节点
当前提交
0cbcb7a6e6
共有 2 个文件被更改,包括 2 次插入2 次删除
  1. 1 1
      core/engine.cpp
  2. 1 1
      core/engine.h

+ 1 - 1
core/engine.cpp

@@ -60,7 +60,7 @@ void Engine::set_target_fps(int p_fps) {
 	_target_fps = p_fps > 0 ? p_fps : 0;
 }
 
-float Engine::get_target_fps() const {
+int Engine::get_target_fps() const {
 	return _target_fps;
 }
 

+ 1 - 1
core/engine.h

@@ -86,7 +86,7 @@ public:
 	float get_physics_jitter_fix() const;
 
 	virtual void set_target_fps(int p_fps);
-	virtual float get_target_fps() const;
+	virtual int get_target_fps() const;
 
 	virtual float get_frames_per_second() const { return _fps; }