From 2d607d7c5cf3806b7d0d0b869bfda3bbb4f6c716 Mon Sep 17 00:00:00 2001 From: Markus Sauermann <6299227+Sauermann@users.noreply.github.com> Date: Wed, 12 Jul 2023 23:12:31 +0200 Subject: [PATCH] Include Display Server Type in Copy System Info Add info about X11 or Wayland to System Information on LinuxBSD. (cherry picked from commit 1712b78e18cbe44664bb68f399f882b33f1a13e8) --- editor/editor_node.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp index 358356adf56..5b3a29ac2cf 100644 --- a/editor/editor_node.cpp +++ b/editor/editor_node.cpp @@ -4376,6 +4376,9 @@ String EditorNode::_get_system_info() const { godot_version += " " + hash; } +#ifdef LINUXBSD_ENABLED + const String display_server = OS::get_singleton()->get_environment("XDG_SESSION_TYPE").capitalize().replace(" ", ""); // `replace` is necessary, because `capitalize` introduces a whitespace between "x" and "11". +#endif // LINUXBSD_ENABLED String driver_name = GLOBAL_GET("rendering/rendering_device/driver"); String rendering_method = GLOBAL_GET("rendering/renderer/rendering_method"); @@ -4428,6 +4431,11 @@ String EditorNode::_get_system_info() const { } else { info.push_back(distribution_name); } +#ifdef LINUXBSD_ENABLED + if (!display_server.is_empty()) { + info.push_back(display_server); + } +#endif // LINUXBSD_ENABLED info.push_back(vformat("%s (%s)", driver_name, rendering_method)); String graphics;