This commit is contained in:
twinaphex 2016-02-08 00:28:05 +01:00
parent 95deab8f1d
commit c30a2ec990
1 changed files with 10 additions and 13 deletions

View File

@ -43,6 +43,16 @@
#define MEASURE_FRAME_TIME_SAMPLES_COUNT (2 * 1024) #define MEASURE_FRAME_TIME_SAMPLES_COUNT (2 * 1024)
#define TIME_TO_FPS(last_time, new_time, frames) ((1000000.0f * (frames)) / ((new_time) - (last_time)))
#define FPS_UPDATE_INTERVAL 256
#ifdef _WIN32
#define U64_SIGN "%I64u"
#else
#define U64_SIGN "%llu"
#endif
typedef struct video_driver_state typedef struct video_driver_state
{ {
retro_time_t frame_time_samples[MEASURE_FRAME_TIME_SAMPLES_COUNT]; retro_time_t frame_time_samples[MEASURE_FRAME_TIME_SAMPLES_COUNT];
@ -793,7 +803,6 @@ bool video_driver_set_rotation(unsigned rotation)
return false; return false;
} }
bool video_driver_set_video_mode(unsigned width, bool video_driver_set_video_mode(unsigned width,
unsigned height, bool fullscreen) unsigned height, bool fullscreen)
{ {
@ -993,11 +1002,6 @@ bool video_monitor_fps_statistics(double *refresh_rate,
return true; return true;
} }
#ifndef TIME_TO_FPS
#define TIME_TO_FPS(last_time, new_time, frames) ((1000000.0f * (frames)) / ((new_time) - (last_time)))
#endif
#define FPS_UPDATE_INTERVAL 256
/** /**
* video_monitor_get_fps: * video_monitor_get_fps:
@ -1012,13 +1016,6 @@ bool video_monitor_fps_statistics(double *refresh_rate,
* otherwise false. * otherwise false.
* *
**/ **/
#ifdef _WIN32
#define U64_SIGN "%I64u"
#else
#define U64_SIGN "%llu"
#endif
bool video_monitor_get_fps(char *buf, size_t size, bool video_monitor_get_fps(char *buf, size_t size,
char *buf_fps, size_t size_fps) char *buf_fps, size_t size_fps)
{ {