Create rarch_main_verbosity and rarch_main_log_file

This commit is contained in:
twinaphex 2015-03-21 06:02:00 +01:00
parent 2409da4afe
commit dc45cafa32
4 changed files with 27 additions and 2 deletions

View File

@ -21,7 +21,7 @@
#include <stdio.h>
#if defined(HAVE_FILE_LOGGER) && defined(RARCH_INTERNAL)
#define LOG_FILE (g_extern.log_file)
#define LOG_FILE (rarch_main_log_file())
#else
#define LOG_FILE (stderr)
#endif
@ -35,7 +35,7 @@
#endif
#if defined(RARCH_INTERNAL)
#define RARCH_LOG_VERBOSE g_extern.verbosity
#define RARCH_LOG_VERBOSE (rarch_main_verbosity())
#else
#define RARCH_LOG_VERBOSE (true)
#endif

View File

@ -1027,6 +1027,22 @@ static void rarch_main_global_deinit(void)
#endif
}
bool rarch_main_verbosity(void)
{
global_t *global = global_get_ptr();
if (!global)
return false;
return global->verbosity;
}
FILE *rarch_main_log_file(void)
{
global_t *global = global_get_ptr();
if (!global)
return NULL;
return global->log_file;
}
static void rarch_main_global_init(void)
{
#if 0

View File

@ -476,6 +476,10 @@ void rarch_main_data_msg_queue_push(unsigned type,
void rarch_main_clear_state(void);
bool rarch_main_verbosity(void);
FILE *rarch_main_log_file(void);
bool rarch_main_is_idle(void);
void rarch_main_data_clear_state(void);

View File

@ -46,6 +46,11 @@ static char *g_auto_path = NULL;
static char *g_driver = NULL;
static unsigned g_meta_level = 0;
bool rarch_main_verbosity(void)
{
return true;
}
settings_t *config_get_ptr(void)
{
return &g_config;