Skip to content

Commit 107675f

Browse files
committed
Mention display driver and window mode in Copy System Info text
This is useful information to know, as the X11 display driver can be used both on X11 natively and on Wayland through XWayland. Certain editor issues only occur in multi-window mode (or only in single-window mode). Some issues also only occur on multi-monitor setups, so the monitor count is now listed.
1 parent 2be730a commit 107675f

File tree

1 file changed

+27
-8
lines changed

1 file changed

+27
-8
lines changed

editor/editor_node.cpp

Lines changed: 27 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4956,8 +4956,10 @@ String EditorNode::_get_system_info() const {
49564956
godot_version += " " + hash;
49574957
}
49584958

4959+
String display_session_type;
49594960
#ifdef LINUXBSD_ENABLED
4960-
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".
4961+
// `replace` is necessary, because `capitalize` introduces a whitespace between "x" and "11".
4962+
display_session_type = OS::get_singleton()->get_environment("XDG_SESSION_TYPE").capitalize().replace(" ", "");
49614963
#endif // LINUXBSD_ENABLED
49624964
String driver_name = OS::get_singleton()->get_current_rendering_driver_name().to_lower();
49634965
String rendering_method = OS::get_singleton()->get_current_rendering_method().to_lower();
@@ -5018,16 +5020,33 @@ String EditorNode::_get_system_info() const {
50185020
// Join info.
50195021
Vector<String> info;
50205022
info.push_back(godot_version);
5023+
String distribution_display_session_type = distribution_name;
50215024
if (!distribution_version.is_empty()) {
5022-
info.push_back(distribution_name + " " + distribution_version);
5023-
} else {
5024-
info.push_back(distribution_name);
5025+
distribution_display_session_type += " " + distribution_version;
50255026
}
5026-
#ifdef LINUXBSD_ENABLED
5027-
if (!display_server.is_empty()) {
5028-
info.push_back(display_server);
5027+
if (!display_session_type.is_empty()) {
5028+
distribution_display_session_type += " on " + display_session_type;
50295029
}
5030+
info.push_back(distribution_display_session_type);
5031+
5032+
String display_driver_window_mode;
5033+
#ifdef LINUXBSD_ENABLED
5034+
// `replace` is necessary, because `capitalize` introduces a whitespace between "x" and "11".
5035+
display_driver_window_mode = DisplayServer::get_singleton()->get_name().capitalize().replace(" ", "") + " display driver";
50305036
#endif // LINUXBSD_ENABLED
5037+
if (!display_driver_window_mode.is_empty()) {
5038+
display_driver_window_mode += ", ";
5039+
}
5040+
display_driver_window_mode += get_viewport()->is_embedding_subwindows() ? "Single-window" : "Multi-window";
5041+
5042+
if (DisplayServer::get_singleton()->get_screen_count() == 1) {
5043+
display_driver_window_mode += ", " + itos(DisplayServer::get_singleton()->get_screen_count()) + " monitor";
5044+
} else {
5045+
display_driver_window_mode += ", " + itos(DisplayServer::get_singleton()->get_screen_count()) + " monitors";
5046+
}
5047+
5048+
info.push_back(display_driver_window_mode);
5049+
50315050
info.push_back(vformat("%s (%s)", driver_name, rendering_method));
50325051

50335052
String graphics;
@@ -5046,7 +5065,7 @@ String EditorNode::_get_system_info() const {
50465065
}
50475066
info.push_back(graphics);
50485067

5049-
info.push_back(vformat("%s (%d Threads)", processor_name, processor_count));
5068+
info.push_back(vformat("%s (%d threads)", processor_name, processor_count));
50505069

50515070
return String(" - ").join(info);
50525071
}

0 commit comments

Comments
 (0)