diff --git a/Source/Core/Common/Src/SDCardUtil.cpp b/Source/Core/Common/Src/SDCardUtil.cpp index cf37ffff3e..5475cf131d 100644 --- a/Source/Core/Common/Src/SDCardUtil.cpp +++ b/Source/Core/Common/Src/SDCardUtil.cpp @@ -36,6 +36,7 @@ #include #include #include +#include #ifndef _WIN32 #include // for unlink() @@ -196,7 +197,7 @@ bool SDCardCreate(u64 disk_size /*in MB*/, const char* filename) disk_size *= 1024 * 1024; if (disk_size < 0x800000 || disk_size > 0x800000000ULL) { - ERROR_LOG(COMMON, "Trying to create SD Card image of size %lliMB is out of range (8MB-32GB)", disk_size/(1024*1024)); + ERROR_LOG(COMMON, "Trying to create SD Card image of size %" PRIu64 "MB is out of range (8MB-32GB)", disk_size/(1024*1024)); return false; } diff --git a/Source/Core/Common/Src/SysConf.cpp b/Source/Core/Common/Src/SysConf.cpp index e1c3eb8abb..519765b10d 100644 --- a/Source/Core/Common/Src/SysConf.cpp +++ b/Source/Core/Common/Src/SysConf.cpp @@ -5,6 +5,8 @@ #include "FileUtil.h" #include "SysConf.h" +#include + SysConf::SysConf() : m_IsValid(false) { @@ -42,7 +44,7 @@ bool SysConf::LoadFromFile(const char *filename) u64 size = File::GetSize(filename); if (size != SYSCONF_SIZE) { - if (AskYesNoT("Your SYSCONF file is the wrong size.\nIt should be 0x%04x (but is 0x%04llx)\nDo you want to generate a new one?", + if (AskYesNoT("Your SYSCONF file is the wrong size.\nIt should be 0x%04x (but is 0x%04" PRIx64 ")\nDo you want to generate a new one?", SYSCONF_SIZE, size)) { GenerateSysConf(); diff --git a/Source/Core/Common/Src/x64Emitter.cpp b/Source/Core/Common/Src/x64Emitter.cpp index 8b3002b26a..261213fdfa 100644 --- a/Source/Core/Common/Src/x64Emitter.cpp +++ b/Source/Core/Common/Src/x64Emitter.cpp @@ -7,6 +7,8 @@ #include "x64ABI.h" #include "CPUDetect.h" +#include + namespace Gen { @@ -176,7 +178,7 @@ void OpArg::WriteRest(XEmitter *emit, int extraBytes, X64Reg _operandReg, _assert_msg_(DYNA_REC, (distance < 0x80000000LL && distance >= -0x80000000LL) || !warn_64bit_offset, - "WriteRest: op out of range (0x%llx uses 0x%llx)", + "WriteRest: op out of range (0x%" PRIx64 " uses 0x%" PRIx64 ")", ripAddr, offset); s32 offs = (s32)distance; emit->Write32((u32)offs); diff --git a/Source/Core/Core/Src/CoreParameter.cpp b/Source/Core/Core/Src/CoreParameter.cpp index 4cba012ea4..e7843fe997 100644 --- a/Source/Core/Core/Src/CoreParameter.cpp +++ b/Source/Core/Core/Src/CoreParameter.cpp @@ -18,6 +18,8 @@ #include "Core.h" // for bWii #include "FifoPlayer/FifoDataFile.h" +#include + SCoreStartupParameter::SCoreStartupParameter() : hInstance(0), bEnableDebugging(false), bAutomaticStart(false), bBootToPause(false), @@ -278,7 +280,7 @@ bool SCoreStartupParameter::AutoSetup(EBootBS2 _BootBS2) // Use the TitleIDhex for name and/or unique ID if launching from nand folder // or if it is not ascii characters (specifically sysmenu could potentially apply to other things) char titleidstr[17]; - snprintf(titleidstr, 17, "%016llx", ContentLoader.GetTitleID()); + snprintf(titleidstr, 17, "%016" PRIx64, ContentLoader.GetTitleID()); if (!m_strName.length()) { diff --git a/Source/Core/Core/Src/CoreTiming.cpp b/Source/Core/Core/Src/CoreTiming.cpp index c17e46fc80..6dac07e567 100644 --- a/Source/Core/Core/Src/CoreTiming.cpp +++ b/Source/Core/Core/Src/CoreTiming.cpp @@ -3,6 +3,7 @@ // Refer to the license.txt file included. #include +#include #include "Thread.h" #include "PowerPC/PowerPC.h" @@ -429,7 +430,7 @@ void LogPendingEvents() Event *ptr = first; while (ptr) { - INFO_LOG(POWERPC, "PENDING: Now: %lld Pending: %lld Type: %d", globalTimer, ptr->time, ptr->type); + INFO_LOG(POWERPC, "PENDING: Now: %" PRId64 " Pending: %" PRId64 " Type: %d", globalTimer, ptr->time, ptr->type); ptr = ptr->next; } } diff --git a/Source/Core/Core/Src/HW/DSPLLE/DSPLLEGlobals.cpp b/Source/Core/Core/Src/HW/DSPLLE/DSPLLEGlobals.cpp index 4013ec77c9..c879f5604b 100644 --- a/Source/Core/Core/Src/HW/DSPLLE/DSPLLEGlobals.cpp +++ b/Source/Core/Core/Src/HW/DSPLLE/DSPLLEGlobals.cpp @@ -6,6 +6,7 @@ #include "FileUtil.h" #include "DSP/DSPCore.h" #include "DSPLLEGlobals.h" +#include #if PROFILE @@ -37,12 +38,12 @@ void ProfilerDump(u64 count) File::IOFile pFile("DSP_Prof.txt", "wt"); if (pFile) { - fprintf(pFile.GetHandle(), "Number of DSP steps: %llu\n\n", count); + fprintf(pFile.GetHandle(), "Number of DSP steps: %" PRIu64 "\n\n", count); for (int i=0; i 0) { - fprintf(pFile.GetHandle(), "0x%04X: %llu\n", i, g_profileMap[i]); + fprintf(pFile.GetHandle(), "0x%04X: %" PRIu64 "\n", i, g_profileMap[i]); } } } diff --git a/Source/Core/Core/Src/HW/GCMemcard.cpp b/Source/Core/Core/Src/HW/GCMemcard.cpp index 22786b3027..adaa7a1858 100644 --- a/Source/Core/Core/Src/HW/GCMemcard.cpp +++ b/Source/Core/Core/Src/HW/GCMemcard.cpp @@ -4,6 +4,9 @@ #include "GCMemcard.h" #include "ColorUtil.h" + +#include + static void ByteSwap(u8 *valueA, u8 *valueB) { u8 tmp = *valueA; @@ -173,7 +176,7 @@ GCMemcard::GCMemcard(const char *filename, bool forceCreation, bool sjis) } else { - PanicAlertT("Failed to read block %d of the save data\nMemcard may be truncated\nFilePosition:%llx", i, mcdFile.Tell()); + PanicAlertT("Failed to read block %d of the save data\nMemcard may be truncated\nFilePosition:%" PRIx64, i, mcdFile.Tell()); m_valid = false; break; } diff --git a/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_DI.cpp b/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_DI.cpp index 9b6cf8ac8e..e0106bf273 100644 --- a/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_DI.cpp +++ b/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_DI.cpp @@ -19,6 +19,8 @@ #include "../../DiscIO/Src/FileMonitor.h" +#include + using namespace DVDInterface; @@ -108,7 +110,7 @@ bool CWII_IPC_HLE_Device_di::IOCtlV(u32 _CommandAddress) // Get TMD offset for requested partition... u64 const TMDOffset = ((u64)Memory::Read_U32(CommandBuffer.InBuffer[0].m_Address + 4) << 2 ) + 0x2c0; - INFO_LOG(WII_IPC_DVD, "DVDLowOpenPartition: TMDOffset 0x%016llx", TMDOffset); + INFO_LOG(WII_IPC_DVD, "DVDLowOpenPartition: TMDOffset 0x%016" PRIx64, TMDOffset); static u32 const TMDsz = 0x208; //CommandBuffer.PayloadBuffer[0].m_Size; u8 pTMD[TMDsz]; @@ -204,13 +206,13 @@ u32 CWII_IPC_HLE_Device_di::ExecuteCommand(u32 _BufferIn, u32 _BufferInSize, u32 pFilename = m_pFileSystem->GetFileName(DVDAddress); if (pFilename != NULL) { - INFO_LOG(WII_IPC_DVD, "DVDLowRead: %s (0x%llx) - (DVDAddr: 0x%llx, Size: 0x%x)", + INFO_LOG(WII_IPC_DVD, "DVDLowRead: %s (0x%" PRIx64 ") - (DVDAddr: 0x%" PRIx64 ", Size: 0x%x)", pFilename, m_pFileSystem->GetFileSize(pFilename), DVDAddress, Size); FileMon::CheckFile(std::string(pFilename), (int)m_pFileSystem->GetFileSize(pFilename)); } else { - INFO_LOG(WII_IPC_DVD, "DVDLowRead: file unknown - (DVDAddr: 0x%llx, Size: 0x%x)", + INFO_LOG(WII_IPC_DVD, "DVDLowRead: file unknown - (DVDAddr: 0x%" PRIx64 ", Size: 0x%x)", DVDAddress, Size); } } @@ -308,7 +310,7 @@ u32 CWII_IPC_HLE_Device_di::ExecuteCommand(u32 _BufferIn, u32 _BufferInSize, u32 u64 DVDAddress = (u64)DVDAddress32 << 2; - INFO_LOG(WII_IPC_DVD, "DVDLowUnencryptedRead: DVDAddr: 0x%08llx, Size: 0x%x", DVDAddress, Size); + INFO_LOG(WII_IPC_DVD, "DVDLowUnencryptedRead: DVDAddr: 0x%08" PRIx64 ", Size: 0x%x", DVDAddress, Size); if (Size > _BufferOutSize) { @@ -342,12 +344,12 @@ u32 CWII_IPC_HLE_Device_di::ExecuteCommand(u32 _BufferIn, u32 _BufferInSize, u32 pFilename = m_pFileSystem->GetFileName(DVDAddress); if (pFilename != NULL) { - INFO_LOG(WII_IPC_DVD, "DVDLowSeek: %s (0x%llx) - (DVDAddr: 0x%llx)", + INFO_LOG(WII_IPC_DVD, "DVDLowSeek: %s (0x%" PRIx64 ") - (DVDAddr: 0x%" PRIx64 ")", pFilename, m_pFileSystem->GetFileSize(pFilename), DVDAddress); } else { - INFO_LOG(WII_IPC_DVD, "DVDLowSeek: file unknown - (DVDAddr: 0x%llx)", + INFO_LOG(WII_IPC_DVD, "DVDLowSeek: file unknown - (DVDAddr: 0x%" PRIx64 ")", DVDAddress); } } diff --git a/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_es.cpp b/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_es.cpp index 151010e8fa..58ff0917ed 100644 --- a/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_es.cpp +++ b/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_es.cpp @@ -35,6 +35,10 @@ #include "WII_IPC_HLE_Device_es.h" +// need to include this before polarssl/aes.h, +// otherwise we may not get __STDC_FORMAT_MACROS +#include + #include "../PowerPC/PowerPC.h" #include "../VolumeHandler.h" #include "FileUtil.h" @@ -205,7 +209,7 @@ u32 CWII_IPC_HLE_Device_es::OpenTitleContent(u32 CFD, u64 TitleID, u16 Index) if (!Loader.IsValid()) { - WARN_LOG(WII_IPC_ES, "ES: loader not valid for %llx", TitleID); + WARN_LOG(WII_IPC_ES, "ES: loader not valid for %" PRIx64, TitleID); return 0xffffffff; } @@ -940,7 +944,7 @@ bool CWII_IPC_HLE_Device_es::IOCtlV(u32 _CommandAddress) if (!bSuccess) { PanicAlertT("IOCTL_ES_LAUNCH: Game tried to reload a title that is not available in your NAND dump\n" - "TitleID %016llx.\n Dolphin will likely hang now.", TitleID); + "TitleID %016" PRIx64".\n Dolphin will likely hang now.", TitleID); } else { @@ -983,7 +987,7 @@ bool CWII_IPC_HLE_Device_es::IOCtlV(u32 _CommandAddress) //TODO: provide correct return code when bSuccess= false Memory::Write_U32(0, _CommandAddress + 0x4); - ERROR_LOG(WII_IPC_ES, "IOCTL_ES_LAUNCH %016llx %08x %016llx %08x %016llx %04x", TitleID,view,ticketid,devicetype,titleid,access); + ERROR_LOG(WII_IPC_ES, "IOCTL_ES_LAUNCH %016" PRIx64 " %08x %016" PRIx64 " %08x %016" PRIx64 " %04x", TitleID,view,ticketid,devicetype,titleid,access); // IOCTL_ES_LAUNCH 0001000248414341 00000001 0001c0fef3df2cfa 00000000 0001000248414341 ffff // This is necessary because Reset(true) above deleted this object. Ew. diff --git a/Source/Core/Core/Src/PowerPC/Interpreter/Interpreter.cpp b/Source/Core/Core/Src/PowerPC/Interpreter/Interpreter.cpp index 0082d9946b..dd71abcaeb 100644 --- a/Source/Core/Core/Src/PowerPC/Interpreter/Interpreter.cpp +++ b/Source/Core/Core/Src/PowerPC/Interpreter/Interpreter.cpp @@ -10,11 +10,11 @@ #include "../../Host.h" #include "../../IPC_HLE/WII_IPC_HLE.h" - #ifdef USE_GDBSTUB #include "../GDBStub.h" #endif +#include namespace { u32 last_pc; @@ -79,7 +79,7 @@ void Trace( UGeckoInstruction &instCode ) std::string fregs = ""; for (int i=0; i<32; i++) { - sprintf(freg, "f%02d: %08llx %08llx ", i, PowerPC::ppcState.ps[i][0], PowerPC::ppcState.ps[i][1]); + sprintf(freg, "f%02d: %08" PRIx64 " %08" PRIx64 " ", i, PowerPC::ppcState.ps[i][0], PowerPC::ppcState.ps[i][1]); fregs.append(freg); } diff --git a/Source/Core/Core/Src/PowerPC/Jit64IL/JitIL.cpp b/Source/Core/Core/Src/PowerPC/Jit64IL/JitIL.cpp index d7ccddb83c..8ecc3a2902 100644 --- a/Source/Core/Core/Src/PowerPC/Jit64IL/JitIL.cpp +++ b/Source/Core/Core/Src/PowerPC/Jit64IL/JitIL.cpp @@ -3,6 +3,7 @@ // Refer to the license.txt file included. #include +#include #include "Common.h" #include "../../HLE/HLE.h" @@ -217,7 +218,7 @@ namespace JitILProfiler const u64 totalElapsed = block.totalElapsed; const u64 numberOfCalls = block.numberOfCalls; const double elapsedPerCall = totalElapsed / (double)numberOfCalls; - fprintf(file.GetHandle(), "%016llx,%lld,%lld,%f\n", codeHash, totalElapsed, numberOfCalls, elapsedPerCall); + fprintf(file.GetHandle(), "%016" PRIx64 ",%" PRId64 ",%" PRId64 ",%f\n", codeHash, totalElapsed, numberOfCalls, elapsedPerCall); } } }; diff --git a/Source/Core/Core/Src/PowerPC/JitCommon/JitBackpatch.cpp b/Source/Core/Core/Src/PowerPC/JitCommon/JitBackpatch.cpp index cd10306f2f..dd481da9bc 100644 --- a/Source/Core/Core/Src/PowerPC/JitCommon/JitBackpatch.cpp +++ b/Source/Core/Core/Src/PowerPC/JitCommon/JitBackpatch.cpp @@ -3,6 +3,7 @@ // Refer to the license.txt file included. #include +#include #include "Common.h" #include "disasm.h" @@ -32,7 +33,7 @@ static void BackPatchError(const std::string &text, u8 *codePtr, u32 emAddress) #endif PanicAlert("%s\n\n" "Error encountered accessing emulated address %08x.\n" - "Culprit instruction: \n%s\nat %#llx", + "Culprit instruction: \n%s\nat %#" PRIx64, text.c_str(), emAddress, disbuf, code_addr); return; } diff --git a/Source/Core/Core/Src/PowerPC/JitILCommon/IR.cpp b/Source/Core/Core/Src/PowerPC/JitILCommon/IR.cpp index ffc5f94b62..a8e37c92dd 100644 --- a/Source/Core/Core/Src/PowerPC/JitILCommon/IR.cpp +++ b/Source/Core/Core/Src/PowerPC/JitILCommon/IR.cpp @@ -118,6 +118,7 @@ Fix profiled loads/stores to work safely. On 32-bit, one solution is to #include #include +#include #include #include #include "IR.h" @@ -1279,7 +1280,7 @@ void IRBuilder::WriteToFile(u64 codeHash) { } FILE* const file = writer->file.GetHandle(); - fprintf(file, "\ncode hash:%016llx\n", codeHash); + fprintf(file, "\ncode hash:%016" PRIx64 "\n", codeHash); const InstLoc lastCurReadPtr = curReadPtr; StartForwardPass(); diff --git a/Source/Core/Core/Src/PowerPC/JitInterface.cpp b/Source/Core/Core/Src/PowerPC/JitInterface.cpp index ce8cc2e3ef..91d43a7792 100644 --- a/Source/Core/Core/Src/PowerPC/JitInterface.cpp +++ b/Source/Core/Core/Src/PowerPC/JitInterface.cpp @@ -3,6 +3,7 @@ // Refer to the license.txt file included. #include +#include #ifdef _WIN32 #include @@ -171,12 +172,12 @@ namespace JitInterface double percent = 100.0 * (double)stat.cost / (double)cost_sum; #ifdef _WIN32 double timePercent = 100.0 * (double)block->ticCounter / (double)timecost_sum; - fprintf(f.GetHandle(), "%08x\t%s\t%llu\t%llu\t%.2lf\t%llf\t%lf\t%i\n", + fprintf(f.GetHandle(), "%08x\t%s\t%" PRIu64 "\t%" PRIu64 "\t%.2lf\t%llf\t%lf\t%i\n", block->originalAddress, name.c_str(), stat.cost, block->ticCounter, percent, timePercent, (double)block->ticCounter*1000.0/(double)countsPerSec, block->codeSize); #else - fprintf(f.GetHandle(), "%08x\t%s\t%llu\t???\t%.2lf\t???\t???\t%i\n", + fprintf(f.GetHandle(), "%08x\t%s\t%" PRIu64 "\t???\t%.2lf\t???\t???\t%i\n", block->originalAddress, name.c_str(), stat.cost, percent, block->codeSize); #endif } diff --git a/Source/Core/Core/Src/PowerPC/PPCTables.cpp b/Source/Core/Core/Src/PowerPC/PPCTables.cpp index 0041904a75..d901f639e5 100644 --- a/Source/Core/Core/Src/PowerPC/PPCTables.cpp +++ b/Source/Core/Core/Src/PowerPC/PPCTables.cpp @@ -4,6 +4,7 @@ #include #include +#include #include "Common.h" #include "PPCTables.h" @@ -213,7 +214,7 @@ void LogCompiledInstructions() { if (m_allInstructions[i]->compileCount > 0) { - fprintf(f.GetHandle(), "%s\t%i\t%lld\t%08x\n", m_allInstructions[i]->opname, + fprintf(f.GetHandle(), "%s\t%i\t%" PRId64 "\t%08x\n", m_allInstructions[i]->opname, m_allInstructions[i]->compileCount, m_allInstructions[i]->runCount, m_allInstructions[i]->lastUse); } } @@ -223,7 +224,7 @@ void LogCompiledInstructions() { if (m_allInstructions[i]->compileCount == 0) { - fprintf(f.GetHandle(), "%s\t%i\t%lld\n", m_allInstructions[i]->opname, + fprintf(f.GetHandle(), "%s\t%i\t%" PRId64 "\n", m_allInstructions[i]->opname, m_allInstructions[i]->compileCount, m_allInstructions[i]->runCount); } } diff --git a/Source/Core/DiscIO/Src/CompressedBlob.cpp b/Source/Core/DiscIO/Src/CompressedBlob.cpp index 3fdc779a44..c801ea3698 100644 --- a/Source/Core/DiscIO/Src/CompressedBlob.cpp +++ b/Source/Core/DiscIO/Src/CompressedBlob.cpp @@ -9,6 +9,8 @@ #include #endif +#include + #include "CompressedBlob.h" #include "DiscScrubber.h" #include "FileUtil.h" @@ -99,7 +101,7 @@ void CompressedBlobReader::GetBlock(u64 block_num, u8 *out_ptr) // First, check hash. u32 block_hash = HashAdler32(source, comp_block_size); if (block_hash != hashes[block_num]) - PanicAlert("Hash of block %lli is %08x instead of %08x.\n" + PanicAlert("Hash of block %" PRIu64 " is %08x instead of %08x.\n" "Your ISO, %s, is corrupt.", block_num, block_hash, hashes[block_num], file_name.c_str()); @@ -127,7 +129,7 @@ void CompressedBlobReader::GetBlock(u64 block_num, u8 *out_ptr) { // this seem to fire wrongly from time to time // to be sure, don't use compressed isos :P - PanicAlert("Failure reading block %lli - out of data and not at end.", block_num); + PanicAlert("Failure reading block %" PRIu64 " - out of data and not at end.", block_num); } inflateEnd(&z); if (uncomp_size != header.block_size) diff --git a/Source/Core/DiscIO/Src/DiscScrubber.cpp b/Source/Core/DiscIO/Src/DiscScrubber.cpp index 4f289cef9f..928383579e 100644 --- a/Source/Core/DiscIO/Src/DiscScrubber.cpp +++ b/Source/Core/DiscIO/Src/DiscScrubber.cpp @@ -7,6 +7,8 @@ #include "FileUtil.h" #include "DiscScrubber.h" +#include + namespace DiscIO { @@ -121,13 +123,13 @@ void GetNextBlock(File::IOFile& in, u8* buffer) if (m_isScrubbing && m_FreeTable[i]) { - DEBUG_LOG(DISCIO, "Freeing 0x%016llx", CurrentOffset); + DEBUG_LOG(DISCIO, "Freeing 0x%016" PRIx64, CurrentOffset); std::fill(buffer, buffer + m_BlockSize, 0xFF); in.Seek(m_BlockSize, SEEK_CUR); } else { - DEBUG_LOG(DISCIO, "Used 0x%016llx", CurrentOffset); + DEBUG_LOG(DISCIO, "Used 0x%016" PRIx64, CurrentOffset); in.ReadBytes(buffer, m_BlockSize); } @@ -150,7 +152,7 @@ void MarkAsUsed(u64 _Offset, u64 _Size) u64 CurrentOffset = _Offset; u64 EndOffset = CurrentOffset + _Size; - DEBUG_LOG(DISCIO, "Marking 0x%016llx - 0x%016llx as used", _Offset, EndOffset); + DEBUG_LOG(DISCIO, "Marking 0x%016" PRIx64 " - 0x%016" PRIx64 " as used", _Offset, EndOffset); while ((CurrentOffset < EndOffset) && (CurrentOffset < m_FileSize)) { diff --git a/Source/Core/DiscIO/Src/FileSystemGCWii.cpp b/Source/Core/DiscIO/Src/FileSystemGCWii.cpp index 90731b2573..cc09138f3e 100644 --- a/Source/Core/DiscIO/Src/FileSystemGCWii.cpp +++ b/Source/Core/DiscIO/Src/FileSystemGCWii.cpp @@ -8,6 +8,7 @@ #include #include #include +#include #include "FileSystemGCWii.h" #include "StringUtil.h" @@ -70,7 +71,7 @@ u64 CFileSystemGCWii::ReadFile(const char* _rFullPath, u8* _pBuffer, size_t _Max if (pFileInfo->m_FileSize > _MaxBufferSize) return 0; - DEBUG_LOG(DISCIO, "Filename: %s. Offset: %llx. Size: %llx",_rFullPath, + DEBUG_LOG(DISCIO, "Filename: %s. Offset: %" PRIx64 ". Size: %" PRIx64, _rFullPath, pFileInfo->m_Offset, pFileInfo->m_FileSize); m_rVolume->Read(pFileInfo->m_Offset, pFileInfo->m_FileSize, _pBuffer); diff --git a/Source/Core/DolphinWX/Src/GameListCtrl.cpp b/Source/Core/DolphinWX/Src/GameListCtrl.cpp index c1d8ef3787..54c59dd806 100644 --- a/Source/Core/DolphinWX/Src/GameListCtrl.cpp +++ b/Source/Core/DolphinWX/Src/GameListCtrl.cpp @@ -9,6 +9,7 @@ #include #include +#include #include #include "FileSearch.h" @@ -383,7 +384,7 @@ wxString NiceSizeFormat(u64 _size) auto const value = (_size + unit_size / 2) / unit_size; auto const frac = (_size % unit_size * 10 + unit_size / 2) / unit_size % 10; - return StrToWxStr(StringFromFormat("%llu.%llu %s", value, frac, unit_symbols[unit])); + return StrToWxStr(StringFromFormat("%" PRIu64 ".%" PRIu64 " %s", value, frac, unit_symbols[unit])); } void CGameListCtrl::InsertItemInReportView(long _Index) diff --git a/Source/Core/DolphinWX/Src/ISOFile.cpp b/Source/Core/DolphinWX/Src/ISOFile.cpp index a867d9b6ca..5aa02f5df1 100644 --- a/Source/Core/DolphinWX/Src/ISOFile.cpp +++ b/Source/Core/DolphinWX/Src/ISOFile.cpp @@ -188,7 +188,7 @@ std::string GameListItem::CreateCacheFilename() // Filename.extension_HashOfFolderPath_Size.cache // Append hash to prevent ISO name-clashing in different folders. - Filename.append(StringFromFormat("%s_%x_%llx.cache", + Filename.append(StringFromFormat("%s_%x_%zx.cache", extension.c_str(), HashFletcher((const u8 *)LegalPathname.c_str(), LegalPathname.size()), File::GetSize(m_FileName))); diff --git a/Source/Core/DolphinWX/Src/ISOProperties.cpp b/Source/Core/DolphinWX/Src/ISOProperties.cpp index a191b79677..89f07815b1 100644 --- a/Source/Core/DolphinWX/Src/ISOProperties.cpp +++ b/Source/Core/DolphinWX/Src/ISOProperties.cpp @@ -7,6 +7,7 @@ #endif #include +#include #include "Common.h" #include "CommonPaths.h" @@ -118,7 +119,7 @@ CISOProperties::CISOProperties(const std::string fileName, wxWindow* parent, wxW u8 _tTitleID[8]; if(OpenISO->GetTitleID(_tTitleID)) { - snprintf(tmp, 17, "%016llx", Common::swap64(_tTitleID)); + snprintf(tmp, 17, "%016" PRIx64, Common::swap64(_tTitleID)); _iniFilename = tmp; } } diff --git a/Source/Core/DolphinWX/Src/MemoryCards/WiiSaveCrypted.cpp b/Source/Core/DolphinWX/Src/MemoryCards/WiiSaveCrypted.cpp index 10cebc904e..2ccc236395 100644 --- a/Source/Core/DolphinWX/Src/MemoryCards/WiiSaveCrypted.cpp +++ b/Source/Core/DolphinWX/Src/MemoryCards/WiiSaveCrypted.cpp @@ -7,12 +7,14 @@ // Licensed under the terms of the GNU GPL, version 2 // http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt +#include +#include + #include "WiiSaveCrypted.h" #include "FileUtil.h" #include "MathUtil.h" #include "NandPaths.h" #include "FileUtil.h" -#include static Common::replace_v replacements; @@ -152,7 +154,7 @@ void CWiiSaveCrypted::ReadHDR() md5((u8*)&_header, HEADER_SZ, md5_calc); if (memcmp(md5_file, md5_calc, 0x10)) { - PanicAlertT("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)); + PanicAlertT("MD5 mismatch\n %016" PRIx64 "%016" PRIx64 " != %016" PRIx64 "%016" PRIx64, Common::swap64(md5_file),Common::swap64(md5_file+8), Common::swap64(md5_calc), Common::swap64(md5_calc+8)); b_valid= false; } @@ -244,7 +246,7 @@ void CWiiSaveCrypted::ReadBKHDR() if (_sizeOfFiles + FULL_CERT_SZ != _totalSize) WARN_LOG(CONSOLE, "Size(%x) + cert(%x) does not equal totalsize(%x)", _sizeOfFiles, FULL_CERT_SZ, _totalSize); if (m_TitleID != Common::swap64(bkhdr.SaveGameTitle)) - WARN_LOG(CONSOLE, "Encrypted title (%llx) does not match unencrypted title (%llx)", m_TitleID, Common::swap64(bkhdr.SaveGameTitle)); + WARN_LOG(CONSOLE, "Encrypted title (%" PRIx64 ") does not match unencrypted title (%" PRIx64 ")", m_TitleID, Common::swap64(bkhdr.SaveGameTitle)); } void CWiiSaveCrypted::WriteBKHDR() diff --git a/Source/Core/VideoBackends/D3D/Src/Render.cpp b/Source/Core/VideoBackends/D3D/Src/Render.cpp index 1a4421f3c5..091eb100be 100644 --- a/Source/Core/VideoBackends/D3D/Src/Render.cpp +++ b/Source/Core/VideoBackends/D3D/Src/Render.cpp @@ -2,7 +2,8 @@ // Licensed under GPLv2 // Refer to the license.txt file included. -#include +#include +#include #include "Timer.h" @@ -928,7 +929,7 @@ void Renderer::Swap(u32 xfbAddr, u32 fbWidth, u32 fbHeight,const EFBRectangle& r if (SConfig::GetInstance().m_ShowLag) { char lag[10]; - StringCchPrintfA(lag, 10, "Lag: %llu\n", Movie::g_currentLagCount); + StringCchPrintfA(lag, 10, "Lag: %" PRIu64 "\n", Movie::g_currentLagCount); D3D::font.DrawTextScaled(0, 18, 20, 0.0f, 0xFF00FFFF, lag); } diff --git a/Source/Core/VideoBackends/OGL/Src/Render.cpp b/Source/Core/VideoBackends/OGL/Src/Render.cpp index d03d3cedd3..63f8a3db49 100644 --- a/Source/Core/VideoBackends/OGL/Src/Render.cpp +++ b/Source/Core/VideoBackends/OGL/Src/Render.cpp @@ -9,6 +9,7 @@ #include #include #include +#include #include "GLUtil.h" #if defined(HAVE_WX) && HAVE_WX @@ -709,7 +710,7 @@ void Renderer::DrawDebugInfo() p+=sprintf(p, "FPS: %d\n", s_fps); if (SConfig::GetInstance().m_ShowLag) - p+=sprintf(p, "Lag: %llu\n", Movie::g_currentLagCount); + p+=sprintf(p, "Lag: %" PRIu64 "\n", Movie::g_currentLagCount); if (g_ActiveConfig.bShowInputDisplay) p+=sprintf(p, "%s", Movie::GetInputDisplay().c_str());