mirror of
https://github.com/godotengine/godot.git
synced 2025-10-20 00:13:30 +00:00
Add new events and accompanying logic to notify when the app is paused and resumed on Android devices.
This commit is contained in:
parent
2add51d082
commit
a7712cc9e4
12 changed files with 123 additions and 29 deletions
|
@ -1387,3 +1387,21 @@ JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_requestPermissionResu
|
|||
AudioDriver::get_singleton()->capture_start();
|
||||
}
|
||||
}
|
||||
|
||||
JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_onRendererResumed(JNIEnv *env, jclass clazz) {
|
||||
if (step == 0)
|
||||
return;
|
||||
|
||||
if (os_android->get_main_loop()) {
|
||||
os_android->get_main_loop()->notification(MainLoop::NOTIFICATION_APP_RESUMED);
|
||||
}
|
||||
}
|
||||
|
||||
JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_onRendererPaused(JNIEnv *env, jclass clazz) {
|
||||
if (step == 0)
|
||||
return;
|
||||
|
||||
if (os_android->get_main_loop()) {
|
||||
os_android->get_main_loop()->notification(MainLoop::NOTIFICATION_APP_PAUSED);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue