summaryrefslogtreecommitdiff
path: root/platform/android/os_android.cpp
diff options
context:
space:
mode:
authorRémi Verschelde <remi@verschelde.fr>2016-01-18 14:44:49 +0100
committerRémi Verschelde <remi@verschelde.fr>2016-01-18 14:44:49 +0100
commit7e20c86ac71d27cc45e6a38feedc3037e8b0e8cd (patch)
tree037fae34110891cff0cdf6fc3c22457da25f2ea3 /platform/android/os_android.cpp
parentc0b9634235ee67415506b5a75a6bd7bb5ef28f21 (diff)
parent4563a5909ae617e458ac4484bfd5229252c2bae8 (diff)
Merge pull request #3360 from volzhs/keep-screen-on-5
Add ability to set "keep screen on" for android & iOS. fixes #2428
Diffstat (limited to 'platform/android/os_android.cpp')
-rw-r--r--platform/android/os_android.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/platform/android/os_android.cpp b/platform/android/os_android.cpp
index 207e4499bc..03177317af 100644
--- a/platform/android/os_android.cpp
+++ b/platform/android/os_android.cpp
@@ -302,6 +302,14 @@ void OS_Android::get_fullscreen_mode_list(List<VideoMode> *p_list,int p_screen)
p_list->push_back(default_videomode);
}
+void OS_Android::set_keep_screen_on(bool p_enabled) {
+ OS::set_keep_screen_on(p_enabled);
+
+ if (set_keep_screen_on_func) {
+ set_keep_screen_on_func(p_enabled);
+ }
+}
+
Size2 OS_Android::get_window_size() const {
return Vector2(default_videomode.width,default_videomode.height);
@@ -734,7 +742,7 @@ void OS_Android::set_context_is_16_bits(bool p_is_16) {
rasterizer->set_force_16_bits_fbo(p_is_16);
}
-OS_Android::OS_Android(GFXInitFunc p_gfx_init_func,void*p_gfx_init_ud, OpenURIFunc p_open_uri_func, GetDataDirFunc p_get_data_dir_func,GetLocaleFunc p_get_locale_func,GetModelFunc p_get_model_func, ShowVirtualKeyboardFunc p_show_vk, HideVirtualKeyboardFunc p_hide_vk, SetScreenOrientationFunc p_screen_orient,GetUniqueIDFunc p_get_unique_id,GetSystemDirFunc p_get_sdir_func, VideoPlayFunc p_video_play_func, VideoIsPlayingFunc p_video_is_playing_func, VideoPauseFunc p_video_pause_func, VideoStopFunc p_video_stop_func,bool p_use_apk_expansion) {
+OS_Android::OS_Android(GFXInitFunc p_gfx_init_func,void*p_gfx_init_ud, OpenURIFunc p_open_uri_func, GetDataDirFunc p_get_data_dir_func,GetLocaleFunc p_get_locale_func,GetModelFunc p_get_model_func, ShowVirtualKeyboardFunc p_show_vk, HideVirtualKeyboardFunc p_hide_vk, SetScreenOrientationFunc p_screen_orient,GetUniqueIDFunc p_get_unique_id,GetSystemDirFunc p_get_sdir_func, VideoPlayFunc p_video_play_func, VideoIsPlayingFunc p_video_is_playing_func, VideoPauseFunc p_video_pause_func, VideoStopFunc p_video_stop_func, SetKeepScreenOnFunc p_set_keep_screen_on_func, bool p_use_apk_expansion) {
use_apk_expansion=p_use_apk_expansion;
@@ -767,6 +775,7 @@ OS_Android::OS_Android(GFXInitFunc p_gfx_init_func,void*p_gfx_init_ud, OpenURIFu
hide_virtual_keyboard_func = p_hide_vk;
set_screen_orientation_func=p_screen_orient;
+ set_keep_screen_on_func = p_set_keep_screen_on_func;
use_reload_hooks=false;
}