瀏覽代碼

Merge pull request #107240 from Calinou/editor-copy-system-info-add-memory

Add memory amount to output from the Copy System Info editor action
Rémi Verschelde 3 月之前
父節點
當前提交
17dc4ccc65
共有 1 個文件被更改,包括 6 次插入0 次删除
  1. 6 0
      editor/editor_node.cpp

+ 6 - 0
editor/editor_node.cpp

@@ -5386,6 +5386,12 @@ String EditorNode::_get_system_info() const {
 
 	info.push_back(vformat("%s (%d threads)", processor_name, processor_count));
 
+	const int64_t system_ram = OS::get_singleton()->get_memory_info()["physical"];
+	if (system_ram > 0) {
+		// If the memory info is available, display it.
+		info.push_back(vformat("%s memory", String::humanize_size(system_ram)));
+	}
+
 	return String(" - ").join(info);
 }