From 31ce3c5fd0300aac1e86bced1efc5f9ec94bdb6b Mon Sep 17 00:00:00 2001 From: Juan Linietsky Date: Thu, 13 Mar 2014 22:57:24 -0300 Subject: -fix bug in cache for atlas import/export -fix some menus -fixed bug in out transition curves -detect and remove file:/// in collada -remove multiscript for now -remove dependencies on mouse in OS, moved to Input -avoid fscache from screwing up (fix might make it slower, but it works) -funcref was missing, it's there now --- core/os/os.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'core/os/os.cpp') diff --git a/core/os/os.cpp b/core/os/os.cpp index 141d5f2b58..c9a5cb1af8 100644 --- a/core/os/os.cpp +++ b/core/os/os.cpp @@ -430,7 +430,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 +447,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; -- cgit v1.2.3 From c0547f5691c9293f82f6713d18b344524146441a Mon Sep 17 00:00:00 2001 From: marynate Date: Wed, 19 Feb 2014 23:35:39 +0800 Subject: Add possibility to limit frame to main loop (application/target_fps) target-fps working, and use fixed physics step before adding physics-fps in project setting Complete implementation of framelimit Conflicts: main/main.cpp --- core/os/os.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'core/os/os.cpp') diff --git a/core/os/os.cpp b/core/os/os.cpp index c9a5cb1af8..f678d38f56 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; @@ -474,6 +482,7 @@ OS::OS() { _exit_code=0; _orientation=SCREEN_LANDSCAPE; _fps=1; + _target_fps=0; _render_thread_mode=RENDER_THREAD_SAFE; Math::seed(1234567); } -- cgit v1.2.3 From 9f33134c93ecbadda70e8eefc50563e29b2eb7f2 Mon Sep 17 00:00:00 2001 From: Juan Linietsky Date: Sat, 5 Apr 2014 12:39:30 -0300 Subject: =?UTF-8?q?-Support=20for=20changing=20fonts=20-Detect=20when=20fr?= =?UTF-8?q?ee()=20might=20crash=20the=20project=20and=20throw=20error=20-f?= =?UTF-8?q?ixed=202D=20Bounce=20in=20physics=20(3d=20still=20broken)=20-re?= =?UTF-8?q?named=20=E2=80=9Con=5Ftop=E2=80=9D=20property=20to=20=E2=80=9Cb?= =?UTF-8?q?ehind=5Fparent=E2=80=9D,=20which=20makes=20more=20sense,=20old?= =?UTF-8?q?=20on=5Ftop=20remains=20there=20for=20compatibility=20but=20is?= =?UTF-8?q?=20invisible.=20-large=20amount=20of=20fixes?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/os/os.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'core/os/os.cpp') diff --git a/core/os/os.cpp b/core/os/os.cpp index f678d38f56..65d6ed50b2 100644 --- a/core/os/os.cpp +++ b/core/os/os.cpp @@ -124,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; -- cgit v1.2.3