1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-04 12:00:25 +00:00

Fix compiling with disable_xr=yes

This commit is contained in:
LuoZhihao
2025-04-04 00:22:18 +08:00
parent 6392241742
commit 31c191ee72

View File

@@ -184,9 +184,9 @@ static PhysicsServer2D *physics_server_2d = nullptr;
static PhysicsServer3DManager *physics_server_3d_manager = nullptr; static PhysicsServer3DManager *physics_server_3d_manager = nullptr;
static PhysicsServer3D *physics_server_3d = nullptr; static PhysicsServer3D *physics_server_3d = nullptr;
#endif // PHYSICS_3D_DISABLED #endif // PHYSICS_3D_DISABLED
#ifndef _3D_DISABLED #ifndef XR_DISABLED
static XRServer *xr_server = nullptr; static XRServer *xr_server = nullptr;
#endif // _3D_DISABLED #endif // XR_DISABLED
// We error out if setup2() doesn't turn this true // We error out if setup2() doesn't turn this true
static bool _start_success = false; static bool _start_success = false;
@@ -4919,11 +4919,11 @@ void Main::cleanup(bool p_force) {
EngineDebugger::deinitialize(); EngineDebugger::deinitialize();
#ifndef _3D_DISABLED #ifndef XR_DISABLED
if (xr_server) { if (xr_server) {
memdelete(xr_server); memdelete(xr_server);
} }
#endif // _3D_DISABLED #endif // XR_DISABLED
if (audio_server) { if (audio_server) {
audio_server->finish(); audio_server->finish();