Skip to content

Commit 4156077

Browse files
committed
Add missing #ifndef _3D_DISABLED to main file
XR is disabled when 3D is disbled so there is no sense in setting xr specific settings and adding `--xr-mode` option Signed-off-by: Yevhen Babiichuk (DustDFG) <dfgdust@gmail.com>
1 parent c3e16cd commit 4156077

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

main/main.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -612,7 +612,9 @@ void Main::print_help(const char *p_binary) {
612612
print_help_option("--position <X>,<Y>", "Request window position.\n");
613613
print_help_option("--screen <N>", "Request window screen.\n");
614614
print_help_option("--single-window", "Use a single window (no separate subwindows).\n");
615+
#ifndef _3D_DISABLED
615616
print_help_option("--xr-mode <mode>", "Select XR (Extended Reality) mode [\"default\", \"off\", \"on\"].\n");
617+
#endif
616618

617619
print_help_title("Debug options");
618620
print_help_option("-d, --debug", "Debug (local stdout debugger).\n");
@@ -2558,6 +2560,7 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph
25582560
GLOBAL_DEF("display/window/ios/hide_status_bar", true);
25592561
GLOBAL_DEF("display/window/ios/suppress_ui_gesture", true);
25602562

2563+
#ifndef _3D_DISABLED
25612564
// XR project settings.
25622565
GLOBAL_DEF_RST_BASIC("xr/openxr/enabled", false);
25632566
GLOBAL_DEF_BASIC(PropertyInfo(Variant::STRING, "xr/openxr/default_action_map", PROPERTY_HINT_FILE, "*.tres"), "res://openxr_action_map.tres");
@@ -2586,7 +2589,8 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph
25862589
// editor settings (it seems we're too early in the process when setting up rendering, to access editor settings...)
25872590
// EDITOR_DEF_RST("xr/openxr/in_editor", false);
25882591
// GLOBAL_DEF("xr/openxr/in_editor", false);
2589-
#endif
2592+
#endif // TOOLS_ENABLED
2593+
#endif // _3D_DISABLED
25902594

25912595
Engine::get_singleton()->set_frame_delay(frame_delay);
25922596

0 commit comments

Comments
 (0)