From a78300a9af7416061d880df733d923b33837801a Mon Sep 17 00:00:00 2001 From: Timothy Ellsworth Bowers Date: Fri, 29 Sep 2017 16:00:08 -0700 Subject: [PATCH] Changed splash to show system RAM in MB if < 1 GB Modified the splash screen to show system RAM in MB rather than GB if there is less than 1024MB of RAM available. So, instead of showing "0GB", it would show, e.g., "923MB". modified: src/display.c --- src/display.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/display.c b/src/display.c index ebd233a..cc12593 100644 --- a/src/display.c +++ b/src/display.c @@ -479,11 +479,17 @@ int display_splash(int input){ switch(SD_SYS){ case(50): sprintf(sd_systype," Linux"); - sprintf(sd_memsize," with %dGB RAM",(int)floor(SYS_RAM/1024.)); + if(SYS_RAM < 1024.) + sprintf(sd_memsize," with %dMB RAM",(int)floor(SYS_RAM)); + else + sprintf(sd_memsize," with %dGB RAM",(int)floor(SYS_RAM/1024.)); break; case(51): sprintf(sd_systype," Mac"); - sprintf(sd_memsize," with %dGB RAM",(int)floor(SYS_RAM/1024.)); + if(SYS_RAM < 1024.) + sprintf(sd_memsize," with %dMB RAM",(int)floor(SYS_RAM)); + else + sprintf(sd_memsize," with %dGB RAM",(int)floor(SYS_RAM/1024.)); break; case(52): sprintf(sd_systype,"n unrecognized");