From 64fe745e8eef532b085ecfc29256f60901364e10 Mon Sep 17 00:00:00 2001 From: Romain Vimont Date: Tue, 26 Jul 2022 12:31:31 +0200 Subject: [PATCH] Replace '%g' by '%f' as printf format For some reason, '%g' does not work correctly with MinGW. Refs #3369 --- app/src/clock.c | 2 +- app/src/control_msg.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/src/clock.c b/app/src/clock.c index fe072f0156..bb2430fdf7 100644 --- a/app/src/clock.c +++ b/app/src/clock.c @@ -98,7 +98,7 @@ sc_clock_update(struct sc_clock *clock, sc_tick system, sc_tick stream) { sc_clock_estimate(clock, &clock->slope, &clock->offset); #ifndef SC_CLOCK_NDEBUG - LOGD("Clock estimation: %g * pts + %" PRItick, + LOGD("Clock estimation: %f * pts + %" PRItick, clock->slope, clock->offset); #endif } diff --git a/app/src/control_msg.c b/app/src/control_msg.c index a57d8cc289..3c3980160e 100644 --- a/app/src/control_msg.c +++ b/app/src/control_msg.c @@ -170,7 +170,7 @@ sc_control_msg_log(const struct sc_control_msg *msg) { if (id == POINTER_ID_MOUSE || id == POINTER_ID_VIRTUAL_FINGER) { // string pointer id LOG_CMSG("touch [id=%s] %-4s position=%" PRIi32 ",%" PRIi32 - " pressure=%g buttons=%06lx", + " pressure=%f buttons=%06lx", id == POINTER_ID_MOUSE ? "mouse" : "vfinger", MOTIONEVENT_ACTION_LABEL(action), msg->inject_touch_event.position.point.x, @@ -180,7 +180,7 @@ sc_control_msg_log(const struct sc_control_msg *msg) { } else { // numeric pointer id LOG_CMSG("touch [id=%" PRIu64_ "] %-4s position=%" PRIi32 ",%" - PRIi32 " pressure=%g buttons=%06lx", + PRIi32 " pressure=%f buttons=%06lx", id, MOTIONEVENT_ACTION_LABEL(action), msg->inject_touch_event.position.point.x,