mirror of
https://github.com/pbatard/rufus.git
synced 2025-05-19 09:25:12 -04:00
[misc] fix XP compatibility
* MinGW's gcc 4.9.2 seems to implement a broken "%lld" format 64 bit integer is followed by more variables and the app executes on XP => use PRI macros * Also fix partition ID being ignored when using Rufus MBR * Also fix some global vars shadowing and add other improvements
This commit is contained in:
parent
5638519ca0
commit
b830c040d2
10 changed files with 48 additions and 45 deletions
|
@ -160,15 +160,15 @@ static __inline uint16_t upo2(uint16_t v)
|
|||
}
|
||||
|
||||
// Convert a size to human readable
|
||||
char* SizeToHumanReadable(uint64_t size, BOOL log, BOOL fake_units)
|
||||
char* SizeToHumanReadable(uint64_t size, BOOL copy_to_log, BOOL fake_units)
|
||||
{
|
||||
int suffix;
|
||||
static char str_size[32];
|
||||
const char* dir = ((right_to_left_mode)&&(!log))?RIGHT_TO_LEFT_MARK:"";
|
||||
const char* dir = ((right_to_left_mode)&&(!copy_to_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;
|
||||
char **_msg_table = copy_to_log?default_msg_table:msg_table;
|
||||
const double divider = fake_units?1000.0:1024.0;
|
||||
|
||||
for (suffix=0; suffix<MAX_SIZE_SUFFIXES-1; suffix++) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue