[haiku-commits] r37097 - haiku/trunk/src/apps/aboutsystem

  • From: wpjvandermeer@xxxxxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Fri, 11 Jun 2010 12:56:39 +0200 (CEST)

Author: wim
Date: 2010-06-11 12:56:39 +0200 (Fri, 11 Jun 2010)
New Revision: 37097
Changeset: http://dev.haiku-os.org/changeset/37097/haiku

Modified:
   haiku/trunk/src/apps/aboutsystem/AboutSystem.cpp
Log:
Use B_PAGE_SIZE for calculating memory size in the AboutSystem app.

Modified: haiku/trunk/src/apps/aboutsystem/AboutSystem.cpp
===================================================================
--- haiku/trunk/src/apps/aboutsystem/AboutSystem.cpp    2010-06-11 08:38:39 UTC 
(rev 37096)
+++ haiku/trunk/src/apps/aboutsystem/AboutSystem.cpp    2010-06-11 10:56:39 UTC 
(rev 37097)
@@ -1673,8 +1673,8 @@
 MemUsageToString(char string[], size_t size, system_info* info)
 {
        snprintf(string, size, B_TRANSLATE("%d MB total, %d MB used (%d%%)"),
-                       int(info->max_pages / 256.0f + 0.5f),
-                       int(info->used_pages / 256.0f + 0.5f),
+                       int(info->max_pages * (B_PAGE_SIZE / 1048576.0f) + 
0.5f),
+                       int(info->used_pages * (B_PAGE_SIZE / 1048576.0f) + 
0.5f),
                        int(100 * info->used_pages / info->max_pages));
 
        return string;


Other related posts:

  • » [haiku-commits] r37097 - haiku/trunk/src/apps/aboutsystem - wpjvandermeer