[core] report detected USB device speed

* Yes, it takes about all of the changes below, to basically add 3 extra characters in the log...
  That's Microsoft Windows for you, baby!
* Closes #314
This commit is contained in:
Pete Batard 2014-05-18 00:37:01 +01:00
parent 4026083da8
commit c85670f7b7
13 changed files with 847 additions and 471 deletions

View file

@ -164,14 +164,13 @@ char* SizeToHumanReadable(uint64_t size, BOOL log, BOOL fake_units)
{
int suffix;
static char str_size[32];
char dir[4];
const char* dir = ((right_to_left_mode)&&(!log))?RIGHT_TO_LEFT_MARK:"";
double hr_size = (double)size;
double t;
uint16_t i_size;
char **_msg_table = log?default_msg_table:msg_table;
const double divider = fake_units?1000.0:1024.0;
static_sprintf(dir, right_to_left_mode?RIGHT_TO_LEFT_MARK:"");
for (suffix=0; suffix<MAX_SIZE_SUFFIXES-1; suffix++) {
if (hr_size < divider)
break;