mirror of
https://github.com/libretro/RetroArch.git
synced 2024-11-24 00:20:01 +00:00
Nuke some more ifdefs and warnings
This commit is contained in:
parent
dc4c2cd6d9
commit
c91c4ff9c0
@ -874,11 +874,7 @@ void config_set_uint64(config_file_t *conf, const char *key, uint64_t val)
|
||||
char buf[128];
|
||||
|
||||
buf[0] = '\0';
|
||||
#ifdef _WIN32
|
||||
snprintf(buf, sizeof(buf), "%I64u", val);
|
||||
#else
|
||||
snprintf(buf, sizeof(buf), "%llu", (long long unsigned)val);
|
||||
#endif
|
||||
snprintf(buf, sizeof(buf), STRING_REP_UINT64, val);
|
||||
config_set_string(conf, key, buf);
|
||||
}
|
||||
|
||||
|
@ -321,7 +321,7 @@ ssize_t chdstream_read(chdstream_t *stream, void *data, size_t bytes)
|
||||
uint32_t amount;
|
||||
size_t data_offset = 0;
|
||||
const chd_header *hd = chd_get_header(stream->chd);
|
||||
uint8_t *out = data;
|
||||
uint8_t *out = (uint8_t*)data;
|
||||
|
||||
if (stream->track_end - stream->offset < bytes)
|
||||
bytes = stream->track_end - stream->offset;
|
||||
|
@ -831,73 +831,27 @@ static int menu_displaylist_parse_system_info(menu_displaylist_info_t *info)
|
||||
|
||||
if (memory_used != 0 && memory_total != 0)
|
||||
{
|
||||
#ifdef _WIN32
|
||||
snprintf(tmp, sizeof(tmp),
|
||||
"%s %s: %Iu/%Iu B",
|
||||
"%s %s: " STRING_REP_UINT64 "/" STRING_REP_UINT64 " B",
|
||||
msg_hash_to_str(MSG_MEMORY),
|
||||
msg_hash_to_str(MSG_IN_BYTES),
|
||||
memory_used,
|
||||
memory_total
|
||||
);
|
||||
snprintf(tmp2, sizeof(tmp2),
|
||||
"%s %s: %Iu/%Iu MB",
|
||||
"%s %s: " STRING_REP_UINT64 "/" STRING_REP_UINT64 " MB",
|
||||
msg_hash_to_str(MSG_MEMORY),
|
||||
msg_hash_to_str(MSG_IN_MEGABYTES),
|
||||
bytes_to_mb(memory_used),
|
||||
bytes_to_mb(memory_total)
|
||||
);
|
||||
snprintf(tmp3, sizeof(tmp3),
|
||||
"%s %s: %Iu/%Iu GB",
|
||||
"%s %s: " STRING_REP_UINT64 "/" STRING_REP_UINT64 " GB",
|
||||
msg_hash_to_str(MSG_MEMORY),
|
||||
msg_hash_to_str(MSG_IN_GIGABYTES),
|
||||
bytes_to_gb(memory_used),
|
||||
bytes_to_gb(memory_total)
|
||||
);
|
||||
#elif defined(__STDC_VERSION__) && __STDC_VERSION__>=199901L
|
||||
snprintf(tmp, sizeof(tmp),
|
||||
"%s %s : %llu/%llu B",
|
||||
msg_hash_to_str(MSG_MEMORY),
|
||||
msg_hash_to_str(MSG_IN_BYTES),
|
||||
(unsigned long long)memory_used,
|
||||
(unsigned long long)memory_total
|
||||
);
|
||||
snprintf(tmp2, sizeof(tmp2),
|
||||
"%s %s : %llu/%llu MB",
|
||||
msg_hash_to_str(MSG_MEMORY),
|
||||
msg_hash_to_str(MSG_IN_MEGABYTES),
|
||||
(unsigned long long)bytes_to_mb(memory_used),
|
||||
(unsigned long long)bytes_to_mb(memory_total)
|
||||
);
|
||||
snprintf(tmp3, sizeof(tmp3),
|
||||
"%s %s: %llu/%llu GB",
|
||||
msg_hash_to_str(MSG_MEMORY),
|
||||
msg_hash_to_str(MSG_IN_GIGABYTES),
|
||||
(unsigned long long)bytes_to_gb(memory_used),
|
||||
(unsigned long long)bytes_to_gb(memory_total)
|
||||
);
|
||||
#else
|
||||
snprintf(tmp, sizeof(tmp),
|
||||
"%s %s: %lu/%lu B",
|
||||
msg_hash_to_str(MSG_MEMORY),
|
||||
msg_hash_to_str(MSG_IN_BYTES),
|
||||
memory_used,
|
||||
memory_total
|
||||
);
|
||||
snprintf(tmp2, sizeof(tmp2),
|
||||
"%s %s : %lu/%lu MB",
|
||||
msg_hash_to_str(MSG_MEMORY),
|
||||
msg_hash_to_str(MSG_IN_MEGABYTES),
|
||||
bytes_to_mb(memory_used),
|
||||
bytes_to_mb(memory_total)
|
||||
);
|
||||
snprintf(tmp3, sizeof(tmp3),
|
||||
"%s %s : %lu/%lu GB",
|
||||
msg_hash_to_str(MSG_MEMORY),
|
||||
msg_hash_to_str(MSG_IN_GIGABYTES),
|
||||
bytes_to_gb(memory_used),
|
||||
bytes_to_gb(memory_total)
|
||||
);
|
||||
#endif
|
||||
menu_entries_append_enum(info->list, tmp, "",
|
||||
MENU_ENUM_LABEL_SYSTEM_INFO_ENTRY,
|
||||
MENU_SETTINGS_CORE_INFO_NONE, 0, 0);
|
||||
|
Loading…
Reference in New Issue
Block a user