(libretro-common) Move STRING_REP_UINT64 to retro_common_api.h

This commit is contained in:
twinaphex 2016-06-28 08:50:22 +02:00
parent 7aff07f6ac
commit 481e7d2f34
2 changed files with 12 additions and 14 deletions

View File

@ -24,6 +24,7 @@
#include <rthreads/rthreads.h>
#endif
#include <retro_common_api.h>
#include <file/config_file.h>
#include <features/features_cpu.h>
@ -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;

View File

@ -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
/*