Skip to content

Commit

Permalink
Move PRIu64 Windows workaround to compat.h
Browse files Browse the repository at this point in the history
So that we can use it from several files.

PR #2814 <#2814>
  • Loading branch information
rom1v committed Nov 23, 2021
1 parent 41abe02 commit 2d5525e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
6 changes: 6 additions & 0 deletions app/src/compat.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@
#include <libavformat/version.h>
#include <SDL2/SDL_version.h>

#ifndef __WIN32
# define PRIu64_ PRIu64
#else
# define PRIu64_ "I64u" // Windows...
#endif

// In ffmpeg/doc/APIchanges:
// 2018-02-06 - 0694d87024 - lavf 58.9.100 - avformat.h
// Deprecate use of av_register_input_format(), av_register_output_format(),
Expand Down
5 changes: 0 additions & 5 deletions app/src/control_msg.c
Original file line number Diff line number Diff line change
Expand Up @@ -171,11 +171,6 @@ control_msg_log(const struct control_msg *msg) {
(long) msg->inject_touch_event.buttons);
} else {
// numeric pointer id
#ifndef __WIN32
# define PRIu64_ PRIu64
#else
# define PRIu64_ "I64u" // Windows...
#endif
LOG_CMSG("touch [id=%" PRIu64_ "] %-4s position=%" PRIi32 ",%"
PRIi32 " pressure=%g buttons=%06lx",
id,
Expand Down

0 comments on commit 2d5525e

Please sign in to comment.