Merge pull request #85100 from ztc0611/fix-ios-focus-mainloop-notifs
Enhance mobile suspend MainLoop notifications
This commit is contained in:
commit
3a2fb42838
6 changed files with 57 additions and 10 deletions
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue