mirror of
https://github.com/libretro/RetroArch.git
synced 2025-02-01 06:23:42 +00:00
Add log level support for libretro cores.
This commit is contained in:
parent
fce4ebd31e
commit
52c32072ec
@ -515,6 +515,9 @@ static const unsigned game_history_size = 100;
|
||||
// Show RGUI start-up screen on boot.
|
||||
static const bool rgui_show_start_screen = true;
|
||||
|
||||
// Log level for libretro cores (GET_LOG_INTERFACE).
|
||||
static const unsigned libretro_log_level = 0;
|
||||
|
||||
|
||||
////////////////////
|
||||
// Keybinds, Joypad
|
||||
|
@ -484,6 +484,9 @@ void dylib_close(dylib_t lib)
|
||||
|
||||
static void rarch_log_libretro(enum retro_log_level level, const char *fmt, ...)
|
||||
{
|
||||
if ((unsigned)level < g_settings.libretro_log_level)
|
||||
return;
|
||||
|
||||
va_list vp;
|
||||
va_start(vp, fmt);
|
||||
|
||||
|
@ -277,6 +277,7 @@ struct settings
|
||||
unsigned game_history_size;
|
||||
|
||||
char libretro[PATH_MAX];
|
||||
unsigned libretro_log_level;
|
||||
char libretro_info_path[PATH_MAX];
|
||||
char cheat_database[PATH_MAX];
|
||||
char cheat_settings_path[PATH_MAX];
|
||||
|
@ -22,6 +22,12 @@
|
||||
# This could fail if ROM extensions overlap.
|
||||
# libretro_path = "/path/to/libretro.so"
|
||||
|
||||
# Sets log level for libretro cores (GET_LOG_INTERFACE).
|
||||
# If a log level issued by a libretro core is below libretro_log_level, it is ignored.
|
||||
# DEBUG logs are always ignored unless verbose mode is activated (--verbose).
|
||||
# DEBUG = 0, INFO = 1, WARN = 2, ERROR = 3.
|
||||
# libretro_log_level = 0
|
||||
|
||||
# Path to core options config file.
|
||||
# This config file is used to expose core-specific options.
|
||||
# It will be written to by RetroArch.
|
||||
|
@ -308,6 +308,7 @@ void config_set_defaults(void)
|
||||
g_settings.network_cmd_port = network_cmd_port;
|
||||
g_settings.stdin_cmd_enable = stdin_cmd_enable;
|
||||
g_settings.game_history_size = game_history_size;
|
||||
g_settings.libretro_log_level = libretro_log_level;
|
||||
|
||||
#ifdef HAVE_MENU
|
||||
g_settings.rgui_show_start_screen = rgui_show_start_screen;
|
||||
@ -941,6 +942,7 @@ bool config_load_file(const char *path, bool set_defaults)
|
||||
*g_settings.rgui_config_directory = '\0';
|
||||
CONFIG_GET_BOOL(rgui_show_start_screen, "rgui_show_start_screen");
|
||||
#endif
|
||||
CONFIG_GET_INT(libretro_log_level, "libretro_log_level");
|
||||
|
||||
#ifdef HAVE_OVERLAY
|
||||
CONFIG_GET_PATH_EXTERN(overlay_dir, "overlay_directory");
|
||||
@ -1362,6 +1364,7 @@ bool config_save_file(const char *path)
|
||||
save_keybinds_player(conf, i);
|
||||
|
||||
config_set_bool(conf, "core_specific_config", g_settings.core_specific_config);
|
||||
config_set_int(conf, "libretro_log_level", g_settings.libretro_log_level);
|
||||
|
||||
bool ret = config_file_write(conf, path);
|
||||
config_file_free(conf);
|
||||
|
Loading…
x
Reference in New Issue
Block a user