Merge pull request #2961 from lioncash/printf

General: Toss out PRI macro usage
This commit is contained in:
Scott Mansell 2015-09-06 21:02:22 +12:00
commit be4caa3dc0
35 changed files with 71 additions and 76 deletions

View file

@ -40,12 +40,12 @@ void ProfilerDump(u64 count)
File::IOFile pFile("DSP_Prof.txt", "wt");
if (pFile)
{
fprintf(pFile.GetHandle(), "Number of DSP steps: %" PRIu64 "\n\n", count);
fprintf(pFile.GetHandle(), "Number of DSP steps: %llu\n\n", count);
for (int i=0; i<PROFILE_MAP_SIZE;i++)
{
if (g_profileMap[i] > 0)
{
fprintf(pFile.GetHandle(), "0x%04X: %" PRIu64 "\n", i, g_profileMap[i]);
fprintf(pFile.GetHandle(), "0x%04X: %llu\n", i, g_profileMap[i]);
}
}
}

View file

@ -778,7 +778,7 @@ void ExecuteCommand(u32 command_0, u32 command_1, u32 command_2, u32 output_addr
// Only used from WII_IPC. This is the only read command that decrypts data
case DVDLowRead:
INFO_LOG(DVDINTERFACE, "DVDLowRead: DVDAddr: 0x%09" PRIx64 ", Size: 0x%x", (u64)command_2 << 2, command_1);
INFO_LOG(DVDINTERFACE, "DVDLowRead: DVDAddr: 0x%09llx, Size: 0x%x", (u64)command_2 << 2, command_1);
read_command = ExecuteReadCommand((u64)command_2 << 2, output_address, command_1, output_length,
true, &interrupt_type, &ticks_until_completion);
break;
@ -845,7 +845,7 @@ void ExecuteCommand(u32 command_0, u32 command_1, u32 command_2, u32 output_addr
// Probably only used by Wii
case DVDLowUnencryptedRead:
INFO_LOG(DVDINTERFACE, "DVDLowUnencryptedRead: DVDAddr: 0x%09" PRIx64 ", Size: 0x%x", (u64)command_2 << 2, command_1);
INFO_LOG(DVDINTERFACE, "DVDLowUnencryptedRead: DVDAddr: 0x%09llx, Size: 0x%x", (u64)command_2 << 2, command_1);
// We must make sure it is in a valid area! (#001 check)
// Are these checks correct? They seem to mix 32-bit offsets and 8-bit lengths
@ -864,7 +864,7 @@ void ExecuteCommand(u32 command_0, u32 command_1, u32 command_2, u32 output_addr
}
else
{
WARN_LOG(DVDINTERFACE, "DVDLowUnencryptedRead: trying to read out of bounds @ %09" PRIx64, (u64)command_2 << 2);
WARN_LOG(DVDINTERFACE, "DVDLowUnencryptedRead: trying to read out of bounds @ %09llx", (u64)command_2 << 2);
g_ErrorCode = ERROR_READY | ERROR_BLOCK_OOB;
// Should cause software to call DVDLowRequestError
interrupt_type = INT_BRKINT;
@ -903,7 +903,7 @@ void ExecuteCommand(u32 command_0, u32 command_1, u32 command_2, u32 output_addr
{
u64 iDVDOffset = (u64)command_1 << 2;
INFO_LOG(DVDINTERFACE, "Read: DVDOffset=%08" PRIx64 ", DMABuffer = %08x, SrcLength = %08x, DMALength = %08x",
INFO_LOG(DVDINTERFACE, "Read: DVDOffset=%08llx, DMABuffer = %08x, SrcLength = %08x, DMALength = %08x",
iDVDOffset, output_address, command_2, output_length);
if (GCAM)
@ -940,7 +940,7 @@ void ExecuteCommand(u32 command_0, u32 command_1, u32 command_2, u32 output_addr
Memory::Write_U32(0x00000000, output_address + i);
break;
default:
ERROR_LOG(DVDINTERFACE, "GC-AM: UNKNOWN MEDIA BOARD LOCATION %" PRIx64, iDVDOffset);
ERROR_LOG(DVDINTERFACE, "GC-AM: UNKNOWN MEDIA BOARD LOCATION %llx", iDVDOffset);
break;
}
break;
@ -1001,7 +1001,7 @@ void ExecuteCommand(u32 command_0, u32 command_1, u32 command_2, u32 output_addr
while (len >= 4)
{
ERROR_LOG(DVDINTERFACE, "GC-AM Media Board WRITE (0xAA): %08" PRIx64 ": %08x", iDVDOffset, Memory::Read_U32(addr));
ERROR_LOG(DVDINTERFACE, "GC-AM Media Board WRITE (0xAA): %08llx: %08x", iDVDOffset, Memory::Read_U32(addr));
addr += 4;
len -= 4;
iDVDOffset += 4;
@ -1013,7 +1013,7 @@ void ExecuteCommand(u32 command_0, u32 command_1, u32 command_2, u32 output_addr
Memory::CopyFromEmu(media_buffer + offset, addr, len);
while (len >= 4)
{
ERROR_LOG(DVDINTERFACE, "GC-AM Media Board WRITE (0xAA): %08" PRIx64 ": %08x", iDVDOffset, Memory::Read_U32(addr));
ERROR_LOG(DVDINTERFACE, "GC-AM Media Board WRITE (0xAA): %08llx: %08x", iDVDOffset, Memory::Read_U32(addr));
addr += 4;
len -= 4;
iDVDOffset += 4;
@ -1027,7 +1027,7 @@ void ExecuteCommand(u32 command_0, u32 command_1, u32 command_2, u32 output_addr
if (!GCAM)
{
// Currently unimplemented
INFO_LOG(DVDINTERFACE, "Seek: offset=%09" PRIx64 " (ignoring)", (u64)command_1 << 2);
INFO_LOG(DVDINTERFACE, "Seek: offset=%09llx (ignoring)", (u64)command_1 << 2);
}
else
{
@ -1189,7 +1189,7 @@ void ExecuteCommand(u32 command_0, u32 command_1, u32 command_2, u32 output_addr
}
}
INFO_LOG(DVDINTERFACE, "(Audio) Stream cmd: %08x offset: %08" PRIx64 " length: %08x",
INFO_LOG(DVDINTERFACE, "(Audio) Stream cmd: %08x offset: %08llx length: %08x",
command_0, (u64)command_1 << 2, command_2);
}
break;
@ -1356,7 +1356,7 @@ u64 SimulateDiscReadTime(u64 offset, u32 length)
if (offset + length - g_last_read_offset > 1024 * 1024)
{
// No buffer; just use the simple seek time + read time.
DEBUG_LOG(DVDINTERFACE, "Seeking %" PRId64 " bytes",
DEBUG_LOG(DVDINTERFACE, "Seeking %lld bytes",
s64(g_last_read_offset) - s64(offset));
ticks_until_completion = disk_read_duration;
g_last_read_time = current_time + ticks_until_completion;
@ -1377,20 +1377,20 @@ u64 SimulateDiscReadTime(u64 offset, u32 length)
if (current_time > buffer_fill_time)
{
DEBUG_LOG(DVDINTERFACE, "Fast buffer read at %" PRIx64, offset);
DEBUG_LOG(DVDINTERFACE, "Fast buffer read at %llx", offset);
ticks_until_completion = buffer_read_duration;
g_last_read_time = buffer_fill_time;
}
else if (current_time + disk_read_duration > buffer_fill_time)
{
DEBUG_LOG(DVDINTERFACE, "Slow buffer read at %" PRIx64, offset);
DEBUG_LOG(DVDINTERFACE, "Slow buffer read at %llx", offset);
ticks_until_completion = std::max(buffer_fill_time - current_time,
buffer_read_duration);
g_last_read_time = buffer_fill_time;
}
else
{
DEBUG_LOG(DVDINTERFACE, "Short seek %" PRId64 " bytes",
DEBUG_LOG(DVDINTERFACE, "Short seek %lld bytes",
s64(g_last_read_offset) - s64(offset));
ticks_until_completion = disk_read_duration;
g_last_read_time = current_time + ticks_until_completion;

View file

@ -181,7 +181,7 @@ GCMemcard::GCMemcard(const std::string &filename, bool forceCreation, bool ascii
}
else
{
PanicAlertT("Failed to read block %u of the save data\nMemcard may be truncated\nFile position: 0x%" PRIx64, i, mcdFile.Tell());
PanicAlertT("Failed to read block %u of the save data\nMemcard may be truncated\nFile position: 0x%llx", i, mcdFile.Tell());
m_valid = false;
break;
}

View file

@ -85,7 +85,7 @@ int GCMemcardDirectory::LoadGCI(const std::string& fileName, DiscIO::IVolume::EC
u64 file_size = gcifile.GetSize();
if (file_size != size + DENTRY_SIZE)
{
PanicAlertT("%s\nwas not loaded because it is an invalid GCI.\n File size (0x%" PRIx64
PanicAlertT("%s\nwas not loaded because it is an invalid GCI.\n File size (0x%llx"
") does not match the size recorded in the header (0x%x)",
gci.m_filename.c_str(), file_size, size + DENTRY_SIZE);
return NO_INDEX;

View file

@ -255,7 +255,7 @@ void CopyFromEmu(void* data, u32 address, size_t size)
{
if (!ValidCopyRange(address, size))
{
PanicAlert("Invalid range in CopyFromEmu. %lx bytes from 0x%08x", (unsigned long)size, address);
PanicAlert("Invalid range in CopyFromEmu. %zx bytes from 0x%08x", size, address);
return;
}
memcpy(data, GetPointer(address), size);
@ -265,7 +265,7 @@ void CopyToEmu(u32 address, const void* data, size_t size)
{
if (!ValidCopyRange(address, size))
{
PanicAlert("Invalid range in CopyToEmu. %lx bytes to 0x%08x", (unsigned long)size, address);
PanicAlert("Invalid range in CopyToEmu. %zx bytes to 0x%08x", size, address);
return;
}
memcpy(GetPointer(address), data, size);

View file

@ -176,7 +176,7 @@ void CWiiSaveCrypted::ReadHDR()
md5((u8*)&m_header, HEADER_SZ, md5_calc);
if (memcmp(md5_file, md5_calc, 0x10))
{
ERROR_LOG(CONSOLE, "MD5 mismatch\n %016" PRIx64 "%016" PRIx64 " != %016" PRIx64 "%016" PRIx64,
ERROR_LOG(CONSOLE, "MD5 mismatch\n %016llx%016llx != %016llx%016llx",
Common::swap64(md5_file),Common::swap64(md5_file + 8), Common::swap64(md5_calc),
Common::swap64(md5_calc + 8));
m_valid= false;
@ -276,7 +276,7 @@ void CWiiSaveCrypted::ReadBKHDR()
}
if (m_title_id != Common::swap64(m_bk_hdr.SaveGameTitle))
{
WARN_LOG(CONSOLE, "Encrypted title (%" PRIx64 ") does not match unencrypted title (%" PRIx64 ")",
WARN_LOG(CONSOLE, "Encrypted title (%llx) does not match unencrypted title (%llx)",
m_title_id, Common::swap64(m_bk_hdr.SaveGameTitle));
}
}