Skip to content

Commit

Permalink
Fix Android builds when OpenXR is disabled
Browse files Browse the repository at this point in the history
  • Loading branch information
m4gr3d committed Aug 31, 2024
1 parent 61598c5 commit 92ffa93
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions platform/android/java_godot_lib_jni.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,10 @@
#include "core/config/project_settings.h"
#include "core/input/input.h"
#include "main/main.h"

#ifndef _3D_DISABLED
#include "servers/xr_server.h"
#endif // _3D_DISABLED

#ifdef TOOLS_ENABLED
#include "editor/editor_settings.h"
Expand Down Expand Up @@ -271,14 +274,16 @@ JNIEXPORT jboolean JNICALL Java_org_godotengine_godot_GodotLib_step(JNIEnv *env,
}

if (step.get() == STEP_SHOW_LOGO) {
bool xr_enabled;
bool xr_enabled = false;
#ifndef _3D_DISABLED
// 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 (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.
#endif // _3D_DISABLED
if (!xr_enabled) {
Main::setup_boot_logo();
}
Expand Down

0 comments on commit 92ffa93

Please sign in to comment.