From 5b20406a33bab21adc7da876880f92f784162355 Mon Sep 17 00:00:00 2001 From: Lukas Matena Date: Fri, 8 Oct 2021 15:15:10 +0200 Subject: [PATCH] SendSystemInfo: Reporting RAM in GiB --- src/slic3r/GUI/SendSystemInfoDialog.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/slic3r/GUI/SendSystemInfoDialog.cpp b/src/slic3r/GUI/SendSystemInfoDialog.cpp index d90d2223f..7c444f34a 100644 --- a/src/slic3r/GUI/SendSystemInfoDialog.cpp +++ b/src/slic3r/GUI/SendSystemInfoDialog.cpp @@ -386,8 +386,8 @@ static std::string generate_system_info_json() pt::ptree hw_node; { hw_node.put("ArchName", wxPlatformInfo::Get().GetArchName()); - // Round MiB to hundreds,then present in GiB - hw_node.put("RAM_GiB", std::round(Slic3r::total_physical_memory()/104857600.)/10.); + size_t num = std::round(Slic3r::total_physical_memory()/107374100.); + hw_node.put("RAM_GiB", std::to_string(num / 10) + "." + std::to_string(num % 10)); } // Now get some CPU info: