simplified R_ImageList_f

This commit is contained in:
myT 2022-12-11 19:13:33 +01:00
parent 33a2c4ad6e
commit 3c8cb0f592

View file

@ -120,17 +120,9 @@ void R_ImageList_f( void )
ri.Printf( PRINT_ALL, " %s\n", image->name );
}
const char* units[] = { "KB", "MB", "GB", "TB" };
int amount = totalByteCount >> 10;
int unit = 0;
while ( amount >= 1024 ) {
amount >>= 10;
++unit;
}
ri.Printf( PRINT_ALL, "---------\n" );
ri.Printf( PRINT_ALL, "%i images found\n", imageCount );
ri.Printf( PRINT_ALL, "Estimated VRAM use: %i %s\n\n", amount, units[unit] );
ri.Printf( PRINT_ALL, "Estimated VRAM use: %s\n\n", Com_FormatBytes( totalByteCount ) );
}