summaryrefslogtreecommitdiffstats
path: root/platform/android
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2024-02-14 14:07:54 +0100
committerRémi Verschelde <rverschelde@gmail.com>2024-02-14 14:07:54 +0100
commit3a2fb42838f790a90c542113fa2c347202ee2c06 (patch)
tree0fa56045e90f37a94110258fd5f7f8d23c9be2f4 /platform/android
parentd3f64bf2d277bfcd3cadbe37106862f9c48feaba (diff)
parentfc7a63cbf3dcec176046b3ba047f40d367213cfb (diff)
downloadredot-engine-3a2fb42838f790a90c542113fa2c347202ee2c06.tar.gz
Merge pull request #85100 from ztc0611/fix-ios-focus-mainloop-notifs
Enhance mobile suspend MainLoop notifications
Diffstat (limited to 'platform/android')
-rw-r--r--platform/android/os_android.cpp6
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);
}