Skip to content

Commit

Permalink
Workaround PRIu64 on Windows
Browse files Browse the repository at this point in the history
On Windows, PRIu64 is defined to "llu", which is not supported:

    error: unknown conversion type character 'l' in format
  • Loading branch information
rom1v committed Jun 20, 2021
1 parent 0a35edd commit 8fa22ac
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion app/src/control_msg.c
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,12 @@ control_msg_log(const struct control_msg *msg) {
(long) msg->inject_touch_event.buttons);
} else {
// 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=%f buttons=%06lx",
id,
MOTIONEVENT_ACTION_LABEL(action),
Expand Down

0 comments on commit 8fa22ac

Please sign in to comment.