diff options
author | volzhs <volzhs@gmail.com> | 2015-11-27 23:40:04 +0900 |
---|---|---|
committer | volzhs <volzhs@gmail.com> | 2016-01-16 20:57:34 +0900 |
commit | fb2bf78591672362adbb62ea15e7be4ac34a7dee (patch) | |
tree | 98da1c62d4183bb0ca2f194f4650595cf386b3e1 /core/bind/core_bind.cpp | |
parent | 3c6dd5749d445f082fc925a34cc0a26f8d342304 (diff) | |
download | redot-engine-fb2bf78591672362adbb62ea15e7be4ac34a7dee.tar.gz |
Add ability to set "keep screen on" for android
Diffstat (limited to 'core/bind/core_bind.cpp')
-rw-r--r-- | core/bind/core_bind.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/core/bind/core_bind.cpp b/core/bind/core_bind.cpp index f951237971..94d9e22a1e 100644 --- a/core/bind/core_bind.cpp +++ b/core/bind/core_bind.cpp @@ -708,6 +708,15 @@ _OS::ScreenOrientation _OS::get_screen_orientation() const { return ScreenOrientation(OS::get_singleton()->get_screen_orientation()); } +void _OS::set_keep_screen_on(bool p_enabled) { + + OS::get_singleton()->set_keep_screen_on(p_enabled); +} + +bool _OS::is_keep_screen_on() const { + + return OS::get_singleton()->is_keep_screen_on(); +} String _OS::get_system_dir(SystemDir p_dir) const { @@ -775,6 +784,8 @@ void _OS::_bind_methods() { ObjectTypeDB::bind_method(_MD("set_screen_orientation","orientation"),&_OS::set_screen_orientation); ObjectTypeDB::bind_method(_MD("get_screen_orientation"),&_OS::get_screen_orientation); + ObjectTypeDB::bind_method(_MD("set_keep_screen_on","enabled"),&_OS::set_keep_screen_on); + ObjectTypeDB::bind_method(_MD("is_keep_screen_on"),&_OS::is_keep_screen_on); ObjectTypeDB::bind_method(_MD("set_iterations_per_second","iterations_per_second"),&_OS::set_iterations_per_second); ObjectTypeDB::bind_method(_MD("get_iterations_per_second"),&_OS::get_iterations_per_second); |