Workaround PRIu64 on Windows

On Windows, PRIu64 is defined to "llu", which is not supported:

    error: unknown conversion type character 'l' in format
This commit is contained in:
Romain Vimont 2021-06-20 01:30:06 +02:00
parent 19ca02cd8f
commit 1039f9b531

View file

@ -170,7 +170,12 @@ control_msg_log(const struct control_msg *msg) {
(long) msg->inject_touch_event.buttons); (long) msg->inject_touch_event.buttons);
} else { } else {
// numeric pointer id // numeric pointer id
LOG_CMSG("touch [id=%" PRIu64 "] %-4s position=%" PRIi32 ",%" #ifndef __WIN32
# define PRIu64_ PRIu64
#else
# define PRIu64_ "I64u" // Windows...
#endif
LOG_CMSG("touch [id=%" PRIu64_ "] %-4s position=%" PRIi32 ",%"
PRIi32 " pressure=%g buttons=%06lx", PRIi32 " pressure=%g buttons=%06lx",
id, id,
MOTIONEVENT_ACTION_LABEL(action), MOTIONEVENT_ACTION_LABEL(action),