diff options
Diffstat (limited to 'core/os/os.cpp')
-rw-r--r-- | core/os/os.cpp | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/core/os/os.cpp b/core/os/os.cpp index 141d5f2b58..65d6ed50b2 100644 --- a/core/os/os.cpp +++ b/core/os/os.cpp @@ -92,6 +92,14 @@ int OS::get_iterations_per_second() const { return ips; } +void OS::set_target_fps(int p_fps) { + _target_fps=p_fps>0? p_fps : 0; +} + +float OS::get_target_fps() const { + return _target_fps; +} + void OS::set_low_processor_usage_mode(bool p_enabled) { low_processor_usage_mode=p_enabled; @@ -116,6 +124,11 @@ String OS::get_executable_path() const { return _execpath; } +int OS::get_process_ID() const { + + return -1; +}; + uint64_t OS::get_frames_drawn() { return frames_drawn; @@ -430,7 +443,7 @@ Error OS::native_video_play(String p_path) { return FAILED; }; -bool OS::native_video_is_playing() { +bool OS::native_video_is_playing() const { return false; }; @@ -447,6 +460,15 @@ void OS::set_mouse_mode(MouseMode p_mode) { } +bool OS::can_use_threads() const { + +#ifdef NO_THREADS + return false; +#else + return true; +#endif +} + OS::MouseMode OS::get_mouse_mode() const{ return MOUSE_MODE_VISIBLE; @@ -465,6 +487,7 @@ OS::OS() { _exit_code=0; _orientation=SCREEN_LANDSCAPE; _fps=1; + _target_fps=0; _render_thread_mode=RENDER_THREAD_SAFE; Math::seed(1234567); } |