Fix some printf portability issues

This commit is contained in:
Bill Currie 2023-07-25 15:07:17 +09:00
parent 6c631693bd
commit 1f99f89a4a
3 changed files with 9 additions and 9 deletions

View file

@ -667,9 +667,9 @@ system_info (void)
UI_Horizontal { UI_Horizontal {
UI_Label ("frame: "); UI_Label ("frame: ");
UI_FlexibleSpace (); UI_FlexibleSpace ();
UI_Labelf ("%'7zd\u03bcs##frame.time", min_delta); UI_Labelf ("%'7"PRIu64"\u03bcs##frame.time", min_delta);
UI_Labelf ("%'7zd\u03bcs##frame.time", delta); UI_Labelf ("%'7"PRIu64"\u03bcs##frame.time", delta);
UI_Labelf ("%'7zd\u03bcs##frame.time", max_delta); UI_Labelf ("%'7"PRIu64"\u03bcs##frame.time", max_delta);
} }
UI_Horizontal { UI_Horizontal {
UI_FlexibleSpace (); UI_FlexibleSpace ();

View file

@ -144,7 +144,7 @@ capture_initiate (const exprval_t **params, exprval_t *result, exprctx_t *ectx)
frame->initiated = true; frame->initiated = true;
auto time = Sys_LongTime (); auto time = Sys_LongTime ();
printf ("capture_initiate: %zd.%03zd.%0zd\n", printf ("capture_initiate: %"PRIu64".%03"PRIu64".%0"PRIu64"\n",
time / 1000000, (time / 1000) % 1000, time % 1000); time / 1000000, (time / 1000) % 1000, time % 1000);
} }
@ -168,7 +168,7 @@ capture_finalize (const exprval_t **params, exprval_t *result, exprctx_t *ectx)
return; return;
} }
auto time = Sys_LongTime (); auto time = Sys_LongTime ();
printf ("capture_finalize: %zd.%03zd.%0zd\n", printf ("capture_finalize: %"PRIu64".%03"PRIu64".%0"PRIu64"\n",
time / 1000000, (time / 1000) % 1000, time % 1000); time / 1000000, (time / 1000) % 1000, time % 1000);
auto device = ctx->device; auto device = ctx->device;
@ -350,6 +350,6 @@ QFV_Capture_Screen (vulkan_ctx_t *ctx, capfunc_t callback, void *data)
frame->callback = callback; frame->callback = callback;
frame->callback_data = data; frame->callback_data = data;
auto time = Sys_LongTime (); auto time = Sys_LongTime ();
printf ("capture_request: %zd.%03zd.%0zd\n", printf ("capture_request: %"PRIu64".%03"PRIu64".%0"PRIu64"\n",
time / 1000000, (time / 1000) % 1000, time % 1000); time / 1000000, (time / 1000) % 1000, time % 1000);
} }

View file

@ -52,9 +52,9 @@ reset_time (qfv_time_t *time)
static void static void
show_time (qfv_time_t *time, imui_ctx_t *imui_ctx, const char *suffix) show_time (qfv_time_t *time, imui_ctx_t *imui_ctx, const char *suffix)
{ {
UI_Labelf ("%'7zd\u03bcs%s", time->min_time, suffix); UI_Labelf ("%'7"PRIu64"\u03bcs%s", time->min_time, suffix);
UI_Labelf ("%'7zd\u03bcs%s", time->cur_time, suffix); UI_Labelf ("%'7"PRIu64"\u03bcs%s", time->cur_time, suffix);
UI_Labelf ("%'7zd\u03bcs%s", time->max_time, suffix); UI_Labelf ("%'7"PRIu64"\u03bcs%s", time->max_time, suffix);
} }
static void static void