diff options
author | Zach Coleman <ztc0611@gmail.com> | 2023-11-17 08:23:06 -0500 |
---|---|---|
committer | Zach Coleman <ztc0611@gmail.com> | 2024-02-04 21:10:06 -0500 |
commit | fc7a63cbf3dcec176046b3ba047f40d367213cfb (patch) | |
tree | d1483c12b03c31a953a9f299de669ae36fe4335d /platform/android | |
parent | b4e2a24c1f62088b3f7ce0197afc90832fc25009 (diff) | |
download | redot-engine-fc7a63cbf3dcec176046b3ba047f40d367213cfb.tar.gz |
Enhance mobile suspend MainLoop Notifications
Diffstat (limited to 'platform/android')
-rw-r--r-- | platform/android/os_android.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/platform/android/os_android.cpp b/platform/android/os_android.cpp index 0d82bec75d..a86cf43042 100644 --- a/platform/android/os_android.cpp +++ b/platform/android/os_android.cpp @@ -324,11 +324,17 @@ void OS_Android::main_loop_end() { void OS_Android::main_loop_focusout() { DisplayServerAndroid::get_singleton()->send_window_event(DisplayServer::WINDOW_EVENT_FOCUS_OUT); + if (OS::get_singleton()->get_main_loop()) { + OS::get_singleton()->get_main_loop()->notification(MainLoop::NOTIFICATION_APPLICATION_FOCUS_OUT); + } audio_driver_android.set_pause(true); } void OS_Android::main_loop_focusin() { DisplayServerAndroid::get_singleton()->send_window_event(DisplayServer::WINDOW_EVENT_FOCUS_IN); + if (OS::get_singleton()->get_main_loop()) { + OS::get_singleton()->get_main_loop()->notification(MainLoop::NOTIFICATION_APPLICATION_FOCUS_IN); + } audio_driver_android.set_pause(false); } |