| 5443 | } |
| 5444 | |
| 5445 | String EditorNode::_get_system_info() const { |
| 5446 | String distribution_name = OS::get_singleton()->get_distribution_name(); |
| 5447 | if (distribution_name.is_empty()) { |
| 5448 | distribution_name = OS::get_singleton()->get_name(); |
| 5449 | } |
| 5450 | if (distribution_name.is_empty()) { |
| 5451 | distribution_name = "Other"; |
| 5452 | } |
| 5453 | const String distribution_version = OS::get_singleton()->get_version_alias(); |
| 5454 | |
| 5455 | String godot_version = "Redot v" + String(REDOT_VERSION_FULL_CONFIG); |
| 5456 | if (String(REDOT_VERSION_BUILD) != "official") { |
| 5457 | String hash = String(REDOT_VERSION_HASH); |
| 5458 | hash = hash.is_empty() ? String("unknown") : vformat("(%s)", hash.left(9)); |
| 5459 | godot_version += " " + hash; |
| 5460 | } |
| 5461 | |
| 5462 | String display_session_type; |
| 5463 | #ifdef LINUXBSD_ENABLED |
| 5464 | // `remove_char` is necessary, because `capitalize` introduces a whitespace between "x" and "11". |
| 5465 | display_session_type = OS::get_singleton()->get_environment("XDG_SESSION_TYPE").capitalize().remove_char(' '); |
| 5466 | #endif // LINUXBSD_ENABLED |
| 5467 | String driver_name = OS::get_singleton()->get_current_rendering_driver_name().to_lower(); |
| 5468 | String rendering_method = OS::get_singleton()->get_current_rendering_method().to_lower(); |
| 5469 | |
| 5470 | const String rendering_device_name = RenderingServer::get_singleton()->get_video_adapter_name(); |
| 5471 | |
| 5472 | RenderingDevice::DeviceType device_type = RenderingServer::get_singleton()->get_video_adapter_type(); |
| 5473 | String device_type_string; |
| 5474 | switch (device_type) { |
| 5475 | case RenderingDevice::DeviceType::DEVICE_TYPE_INTEGRATED_GPU: |
| 5476 | device_type_string = "integrated"; |
| 5477 | break; |
| 5478 | case RenderingDevice::DeviceType::DEVICE_TYPE_DISCRETE_GPU: |
| 5479 | device_type_string = "dedicated"; |
| 5480 | break; |
| 5481 | case RenderingDevice::DeviceType::DEVICE_TYPE_VIRTUAL_GPU: |
| 5482 | device_type_string = "virtual"; |
| 5483 | break; |
| 5484 | case RenderingDevice::DeviceType::DEVICE_TYPE_CPU: |
| 5485 | device_type_string = "(software emulation on CPU)"; |
| 5486 | break; |
| 5487 | case RenderingDevice::DeviceType::DEVICE_TYPE_OTHER: |
| 5488 | case RenderingDevice::DeviceType::DEVICE_TYPE_MAX: |
| 5489 | break; // Can't happen, but silences warning for DEVICE_TYPE_MAX |
| 5490 | } |
| 5491 | |
| 5492 | const Vector<String> video_adapter_driver_info = OS::get_singleton()->get_video_adapter_driver_info(); |
| 5493 | |
| 5494 | const String processor_name = OS::get_singleton()->get_processor_name(); |
| 5495 | const int processor_count = OS::get_singleton()->get_processor_count(); |
| 5496 | |
| 5497 | // Prettify |
| 5498 | if (rendering_method == "forward_plus") { |
| 5499 | rendering_method = "Forward+"; |
| 5500 | } else if (rendering_method == "mobile") { |
| 5501 | rendering_method = "Mobile"; |
| 5502 | } else if (rendering_method == "gl_compatibility") { |
nothing calls this directly
no test coverage detected