pcsx2|lilypad|gsdx: use portable printf format

(portable: let's see VS compilation...)
This commit is contained in:
Gregory Hainaut 2016-01-22 09:58:10 +01:00
parent 2c3f9e35ac
commit 2ff611137e
5 changed files with 6 additions and 5 deletions

View File

@ -44,6 +44,7 @@
#include <cstring> // string.h under c++
#include <cstdio> // stdio.h under c++
#include <cstdlib>
#include <cinttypes> // Printf format
// ... and include some ANSI/POSIX C libs that are useful too, just for good measure.
// (these compile lightning fast with or without PCH, but they never change so

View File

@ -1022,13 +1022,13 @@ void CtrlDisassemblyView::updateStatusBarText()
data = cpu->read64(line.info.dataAddress);
}
sprintf(text,"[%08X] = %016llX",line.info.dataAddress,data);
sprintf(text,"[%08X] = %016" PRIX64,line.info.dataAddress,data);
break;
}
case 16:
{
__aligned16 u128 data = cpu->read128(line.info.dataAddress);
sprintf(text,"[%08X] = %016llX%016llX",line.info.dataAddress,data._u64[1],data._u64[0]);
sprintf(text,"[%08X] = %016" PRIX64 "%016" PRIX64,line.info.dataAddress,data._u64[1],data._u64[0]);
break;
}
}

View File

@ -125,7 +125,7 @@ protected:
if(vertices == NULL)
{
printf("GSdx: failed to allocate %d bytes for verticles.\n", sizeof(Vertex) * maxcount);
printf("GSdx: failed to allocate %d bytes for verticles.\n", (int)sizeof(Vertex) * maxcount);
throw GSDXError();
}

View File

@ -2372,7 +2372,7 @@ void GSState::GrowVertexBuffer()
if(vertex == NULL || index == NULL)
{
printf("GSdx: failed to allocate %d bytes for verticles and %d for indices.\n", sizeof(GSVertex) * maxcount, sizeof(uint32) * maxcount * 3);
printf("GSdx: failed to allocate %d bytes for verticles and %d for indices.\n", (int)sizeof(GSVertex) * maxcount, (int)sizeof(uint32) * maxcount * 3);
throw GSDXError();
}

View File

@ -88,7 +88,7 @@ JoyEvdev::JoyEvdev(int fd, bool ds3, const wchar_t *id) : Device(LNX_JOY, OTHER,
}
}
fprintf(stderr, "New device created. Found axe:%d, buttons:%d, m_rel:%d\n\n", m_abs.size(), m_btn.size(), m_rel.size());
fprintf(stderr, "New device created. Found axe:%zu, buttons:%zu, m_rel:%zu\n\n", m_abs.size(), m_btn.size(), m_rel.size());
}
JoyEvdev::~JoyEvdev() {