8 changes: 5 additions & 3 deletions Source/Core/DiscIO/Src/DiscScrubber.cpp
Expand Up @@ -7,6 +7,8 @@
#include "FileUtil.h"
#include "DiscScrubber.h"

#include <cinttypes>

namespace DiscIO
{

Expand Down Expand Up @@ -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);
}

Expand All @@ -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))
{
Expand Down
3 changes: 2 additions & 1 deletion Source/Core/DiscIO/Src/FileSystemGCWii.cpp
Expand Up @@ -8,6 +8,7 @@
#include <string>
#include <vector>
#include <algorithm>
#include <cinttypes>

#include "FileSystemGCWii.h"
#include "StringUtil.h"
Expand Down Expand Up @@ -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);
Expand Down
3 changes: 2 additions & 1 deletion Source/Core/DolphinWX/Src/GameListCtrl.cpp
Expand Up @@ -9,6 +9,7 @@
#include <wx/filename.h>

#include <algorithm>
#include <cinttypes>
#include <memory>

#include "FileSearch.h"
Expand Down Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion Source/Core/DolphinWX/Src/ISOFile.cpp
Expand Up @@ -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)));

Expand Down
3 changes: 2 additions & 1 deletion Source/Core/DolphinWX/Src/ISOProperties.cpp
Expand Up @@ -7,6 +7,7 @@
#endif

#include <type_traits>
#include <cinttypes>

#include "Common.h"
#include "CommonPaths.h"
Expand Down Expand Up @@ -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;
}
}
Expand Down
8 changes: 5 additions & 3 deletions Source/Core/DolphinWX/Src/MemoryCards/WiiSaveCrypted.cpp
Expand Up @@ -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 <algorithm>
#include <cinttypes>

#include "WiiSaveCrypted.h"
#include "FileUtil.h"
#include "MathUtil.h"
#include "NandPaths.h"
#include "FileUtil.h"
#include <algorithm>

static Common::replace_v replacements;

Expand Down Expand Up @@ -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;
}

Expand Down Expand Up @@ -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()
Expand Down
5 changes: 3 additions & 2 deletions Source/Core/VideoBackends/D3D/Src/Render.cpp
Expand Up @@ -2,7 +2,8 @@
// Licensed under GPLv2
// Refer to the license.txt file included.

#include <math.h>
#include <cinttypes>
#include <cmath>

#include "Timer.h"

Expand Down Expand Up @@ -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);
}

Expand Down
3 changes: 2 additions & 1 deletion Source/Core/VideoBackends/OGL/Src/Render.cpp
Expand Up @@ -9,6 +9,7 @@
#include <vector>
#include <cmath>
#include <cstdio>
#include <cinttypes>

#include "GLUtil.h"
#if defined(HAVE_WX) && HAVE_WX
Expand Down Expand Up @@ -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());
Expand Down