trying out PRI* print formats

This commit is contained in:
David CARLIER 2022-12-09 15:38:40 +00:00
parent 889ff7a067
commit aefe787eca
3 changed files with 5 additions and 9 deletions

View File

@ -713,17 +713,12 @@ YQ2_ATTR_NORETURN void Com_Quit(void);
/* Ugly work around for unsupported
* format specifiers unter mingw. */
#define YQ2_COM_PRId64 PRId64
#define YQ2_COM_PRIu64 PRIu64
#ifdef WIN32
#define YQ2_COM_PRId64 "%I64d"
#define YQ2_COM_PRIu64 "%I64u"
#define YQ2_COM_PRIdS "%Id"
#else
#define YQ2_COM_PRId64 "%ld"
#if defined(__APPLE__)
#define YQ2_COM_PRIu64 "%llu"
#else
#define YQ2_COM_PRIu64 "%lu"
#endif
#define YQ2_COM_PRIdS "%zd"
#endif

View File

@ -37,6 +37,7 @@
#include <string.h>
#include <stdlib.h>
#include <time.h>
#include <inttypes.h>
#ifdef true
#undef true

View File

@ -2510,7 +2510,7 @@ uint8_t *QVk_GetStagingBuffer(VkDeviceSize size, int alignment, VkCommandBuffer
stagingBuffer = &vk_stagingBuffers[vk_activeStagingBuffer];
if (size > stagingBuffer->resource.size)
{
R_Printf(PRINT_ALL, "%s: %d: Resize stanging buffer" YQ2_COM_PRIu64 "->" YQ2_COM_PRIu64 "\n",
R_Printf(PRINT_ALL, "%s: %d: Resize stanging buffer %" YQ2_COM_PRIu64 "-> %" YQ2_COM_PRIu64 "\n",
__func__, vk_activeStagingBuffer, stagingBuffer->resource.size, size);
DestroyStagingBuffer(stagingBuffer);