(Libretro) Expose perf_log as callback too to libretro

This commit is contained in:
twinaphex 2013-12-17 19:37:33 +01:00
parent 69a67b3df2
commit 166aa29443
4 changed files with 7 additions and 0 deletions

View File

@ -847,6 +847,7 @@ bool rarch_environment_cb(unsigned cmd, void *data)
cb->get_perf_counter = rarch_get_perf_counter;
cb->get_time_usec = rarch_get_time_usec;
cb->get_cpu_features = rarch_get_cpu_features;
cb->perf_log = rarch_perf_log;
break;
}

View File

@ -366,7 +366,9 @@ returntype main_entry(signature())
rarch_deinit_msg_queue();
global_uninit_drivers();
#ifdef PERF_TEST
rarch_perf_log();
#endif
#if defined(HAVE_LOGGER) && !defined(ANDROID)
logger_shutdown();

View File

@ -40,7 +40,9 @@ static void endloop(void)
rarch_deinit_msg_queue();
#ifdef PERF_TEST
rarch_perf_log();
#endif
rarch_main_clear_state();

View File

@ -616,12 +616,14 @@ typedef struct retro_perf_counter
typedef retro_time_t (*retro_perf_get_time_usec_t)(void);
typedef retro_perf_tick_t (*retro_perf_get_counter_t)(void);
typedef void (*retro_get_cpu_features_t)(unsigned*);
typedef void (*retro_perf_log_t)(void);
struct retro_perf_callback
{
retro_perf_get_time_usec_t get_time_usec;
retro_perf_get_counter_t get_perf_counter;
retro_get_cpu_features_t get_cpu_features;
retro_perf_log_t perf_log;
};
#if defined(PERF_TEST)