Merge pull request #94799 from m4gr3d/memory_allocation_cleanup_and_optimizations

Android memory cleanup and optimizations
This commit is contained in:
Rémi Verschelde 2024-08-16 23:45:39 +02:00
commit 82adfebcf8
No known key found for this signature in database
GPG key ID: C3336907360768E1
14 changed files with 626 additions and 188 deletions

View file

@ -51,6 +51,7 @@
#include "core/config/project_settings.h"
#include "core/input/input.h"
#include "main/main.h"
#include "servers/xr_server.h"
#ifdef TOOLS_ENABLED
#include "editor/editor_settings.h"
@ -270,7 +271,18 @@ JNIEXPORT jboolean JNICALL Java_org_godotengine_godot_GodotLib_step(JNIEnv *env,
}
if (step.get() == STEP_SHOW_LOGO) {
Main::setup_boot_logo();
bool xr_enabled;
if (XRServer::get_xr_mode() == XRServer::XRMODE_DEFAULT) {
xr_enabled = GLOBAL_GET("xr/shaders/enabled");
} else {
xr_enabled = XRServer::get_xr_mode() == XRServer::XRMODE_ON;
}
// Unlike PCVR, there's no additional 2D screen onto which to render the boot logo,
// so we skip this step if xr is enabled.
if (!xr_enabled) {
Main::setup_boot_logo();
}
step.increment();
return true;
}