From 481e7d2f34a68591215d83c6dc63e603cbe457f2 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Tue, 28 Jun 2016 08:50:22 +0200 Subject: [PATCH] (libretro-common) Move STRING_REP_UINT64 to retro_common_api.h --- gfx/video_driver.c | 11 +++-------- libretro-common/include/retro_common_api.h | 15 +++++++++------ 2 files changed, 12 insertions(+), 14 deletions(-) diff --git a/gfx/video_driver.c b/gfx/video_driver.c index 4013ad9037..6aa19960e6 100644 --- a/gfx/video_driver.c +++ b/gfx/video_driver.c @@ -24,6 +24,7 @@ #include #endif +#include #include #include @@ -53,12 +54,6 @@ #define FPS_UPDATE_INTERVAL 256 -#ifdef _WIN32 -#define U64_SIGN "%I64u" -#else -#define U64_SIGN "%llu" -#endif - typedef struct video_driver_state { struct @@ -1017,7 +1012,7 @@ bool video_monitor_get_fps(char *buf, size_t size, strlcat(buf, "Frames: ", size); - snprintf(frames_text, sizeof(frames_text), U64_SIGN, + snprintf(frames_text, sizeof(frames_text), STRING_REP_UINT64, (unsigned long long)video_driver_frame_count); strlcat(buf, frames_text, size); @@ -1025,7 +1020,7 @@ bool video_monitor_get_fps(char *buf, size_t size, } if (buf_fps && settings->fps_show) - snprintf(buf_fps, size_fps, "FPS: %6.1f || Frames: " U64_SIGN, + snprintf(buf_fps, size_fps, "FPS: %6.1f || Frames: " STRING_REP_UINT64, last_fps, (unsigned long long)video_driver_frame_count); return ret; diff --git a/libretro-common/include/retro_common_api.h b/libretro-common/include/retro_common_api.h index f8d743c7cc..0532612497 100644 --- a/libretro-common/include/retro_common_api.h +++ b/libretro-common/include/retro_common_api.h @@ -76,14 +76,17 @@ typedef int ssize_t; #endif #ifdef _WIN32 -#define STRING_REP_INT64 "%I64u" -#define STRING_REP_ULONG "%Iu" +#define STRING_REP_INT64 "%I64u" +#define STRING_REP_UINT64 "%I64u" +#define STRING_REP_ULONG "%Iu" #elif defined(__STDC_VERSION__) && __STDC_VERSION__>=199901L -#define STRING_REP_INT64 "%llu" -#define STRING_REP_ULONG "%zu" +#define STRING_REP_INT64 "%llu" +#define STRING_REP_UINT64 "%llu" +#define STRING_REP_ULONG "%zu" #else -#define STRING_REP_INT64 "%llu" -#define STRING_REP_ULONG "%lu" +#define STRING_REP_INT64 "%llu" +#define STRING_REP_UINT64 "%llu" +#define STRING_REP_ULONG "%lu" #endif /*