Skip to content

Commit

Permalink
Include Display Server Type in Copy System Info
Browse files Browse the repository at this point in the history
Add info about X11 or Wayland to System Information on LinuxBSD.
  • Loading branch information
Sauermann committed Jul 16, 2023
1 parent 287f3aa commit 1712b78
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions editor/editor_node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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");

Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 1712b78

Please sign in to comment.