Update verbosity checks

This commit is contained in:
twinaphex 2015-11-22 21:55:06 +01:00
parent 6eda4bc9af
commit 8a16897aea
6 changed files with 42 additions and 29 deletions

View File

@ -1185,6 +1185,7 @@ static bool config_load_file(const char *path, bool set_defaults)
config_file_t *conf = NULL; config_file_t *conf = NULL;
settings_t *settings = config_get_ptr(); settings_t *settings = config_get_ptr();
global_t *global = global_get_ptr(); global_t *global = global_get_ptr();
bool *verbose = retro_main_verbosity();
if (path) if (path)
{ {
@ -1216,7 +1217,7 @@ static bool config_load_file(const char *path, bool set_defaults)
extra_path = strtok_r(NULL, "|", &save); extra_path = strtok_r(NULL, "|", &save);
} }
#if 0 #if 0
if (global->verbosity) if (*verbose)
{ {
RARCH_LOG_OUTPUT("=== Config ===\n"); RARCH_LOG_OUTPUT("=== Config ===\n");
config_file_dump_all(conf); config_file_dump_all(conf);
@ -1541,7 +1542,6 @@ static bool config_load_file(const char *path, bool set_defaults)
{ {
if (config_get_bool(conf, "log_verbosity", &tmp_bool)) if (config_get_bool(conf, "log_verbosity", &tmp_bool))
{ {
bool *verbose = retro_main_verbosity();
if (verbose) if (verbose)
*verbose = tmp_bool; *verbose = tmp_bool;
} }

View File

@ -109,7 +109,8 @@ static void frontend_ctr_deinit(void *data)
(void)data; (void)data;
#ifndef IS_SALAMANDER #ifndef IS_SALAMANDER
global_t *global = global_get_ptr(); global_t *global = global_get_ptr();
global->verbosity = true; bool *verbose = retro_main_verbosity();
*verbose = true;
#ifdef HAVE_FILE_LOGGER #ifdef HAVE_FILE_LOGGER
if (global->log_file) if (global->log_file)
@ -199,7 +200,9 @@ static void frontend_ctr_init(void *data)
#ifndef IS_SALAMANDER #ifndef IS_SALAMANDER
(void)data; (void)data;
global_t *global = global_get_ptr(); global_t *global = global_get_ptr();
global->verbosity = true; bool *verbose = retro_main_verbosity();
*verbose = true;
#if 0 #if 0
APT_SetAppCpuTimeLimit(NULL, 80); APT_SetAppCpuTimeLimit(NULL, 80);

View File

@ -97,9 +97,10 @@ static void frontend_ps3_get_environment_settings(int *argc, char *argv[],
void *args, void *params_data) void *args, void *params_data)
{ {
#ifndef IS_SALAMANDER #ifndef IS_SALAMANDER
global_t *global = global_get_ptr(); global_t *global = global_get_ptr();
bool original_verbose = global->verbosity; bool *verbose = retro_main_verbosity();
global->verbosity = true; bool original_verbose = *verbose;
*verbose = true;
#endif #endif
(void)args; (void)args;
@ -233,7 +234,7 @@ static void frontend_ps3_get_environment_settings(int *argc, char *argv[],
} }
#ifndef IS_SALAMANDER #ifndef IS_SALAMANDER
global->verbosity = original_verbose; *verbose = original_verbose;
#endif #endif
} }
@ -361,9 +362,10 @@ static void frontend_ps3_exec(const char *path, bool should_load_game)
#ifndef IS_SALAMANDER #ifndef IS_SALAMANDER
char *fullpath = NULL; char *fullpath = NULL;
global_t *global = global_get_ptr(); global_t *global = global_get_ptr();
bool original_verbose = global->verbosity; bool *verbose = retro_main_verbosity();
bool original_verbose = *verbose;
global->verbosity = true; *verbose = true;
#endif #endif
(void)should_load_game; (void)should_load_game;
@ -399,7 +401,7 @@ static void frontend_ps3_exec(const char *path, bool should_load_game)
cellSysmoduleUnloadModule(CELL_SYSMODULE_NET); cellSysmoduleUnloadModule(CELL_SYSMODULE_NET);
#ifndef IS_SALAMANDER #ifndef IS_SALAMANDER
global->verbosity = original_verbose; *verbose = original_verbose;
#endif #endif
} }
@ -409,9 +411,11 @@ static void frontend_ps3_exitspawn(char *core_path, size_t core_path_size)
bool should_load_game = false; bool should_load_game = false;
#ifndef IS_SALAMANDER #ifndef IS_SALAMANDER
global_t *global = global_get_ptr(); global_t *global = global_get_ptr();
bool original_verbose = global->verbosity; bool *verbose = retro_main_verbosity();
global->verbosity = true; bool original_verbose = *verbose;
*verbose = true;
should_load_game = exitspawn_start_game; should_load_game = exitspawn_start_game;
@ -434,7 +438,7 @@ static void frontend_ps3_exitspawn(char *core_path, size_t core_path_size)
#endif #endif
#ifndef IS_SALAMANDER #ifndef IS_SALAMANDER
global->verbosity = original_verbose; *verbose = original_verbose;
#endif #endif
#endif #endif
} }

View File

@ -164,8 +164,10 @@ static void frontend_psp_deinit(void *data)
{ {
(void)data; (void)data;
#ifndef IS_SALAMANDER #ifndef IS_SALAMANDER
bool *verbose = retro_main_verbosity();
global_t *global = global_get_ptr(); global_t *global = global_get_ptr();
global->verbosity = false;
*verbose = false;
#ifdef HAVE_FILE_LOGGER #ifdef HAVE_FILE_LOGGER
if (global->log_file) if (global->log_file)

View File

@ -122,8 +122,9 @@ void system_exec_wii(const char *_path, bool should_load_game)
char game_path[PATH_MAX_LENGTH]; char game_path[PATH_MAX_LENGTH];
#ifndef IS_SALAMANDER #ifndef IS_SALAMANDER
global_t *global = global_get_ptr(); global_t *global = global_get_ptr();
bool original_verbose = global->verbosity; bool *verbose = retro_main_verbosity();
global->verbosity = true; bool original_verbose = *verbose;
*verbose = true;
#endif #endif
/* copy heap info into stack so it survives /* copy heap info into stack so it survives
@ -189,6 +190,6 @@ void system_exec_wii(const char *_path, bool should_load_game)
exit: exit:
(void)0; (void)0;
#ifndef IS_SALAMANDER #ifndef IS_SALAMANDER
global->verbosity = original_verbose; *verbose = original_verbose;
#endif #endif
} }

View File

@ -74,8 +74,9 @@ static HRESULT xbox_io_mount(char *szDrive, char *szDevice)
{ {
#ifndef IS_SALAMANDER #ifndef IS_SALAMANDER
global_t *global = global_get_ptr(); global_t *global = global_get_ptr();
bool original_verbose = global->verbosity; bool *verbose = retro_main_verbosity();
global->verbosity = true; bool original_verbose = *verbose;
*verbose = true;
#endif #endif
char szSourceDevice[48] = {0}; char szSourceDevice[48] = {0};
char szDestinationDrive[16] = {0}; char szDestinationDrive[16] = {0};
@ -102,7 +103,7 @@ static HRESULT xbox_io_mount(char *szDrive, char *szDevice)
IoCreateSymbolicLink(&LinkName, &DeviceName); IoCreateSymbolicLink(&LinkName, &DeviceName);
#ifndef IS_SALAMANDER #ifndef IS_SALAMANDER
global->verbosity = original_verbose; *verbose = original_verbose;
#endif #endif
return S_OK; return S_OK;
} }
@ -135,9 +136,10 @@ static void frontend_xdk_get_environment_settings(int *argc, char *argv[],
#ifndef IS_SALAMANDER #ifndef IS_SALAMANDER
global_t *global = global_get_ptr(); global_t *global = global_get_ptr();
bool original_verbose = global->verbosity; bool *verbose = retro_main_verbosity();
bool original_verbose = *verbose;
global->verbosity = true; *verbose = true;
#endif #endif
#ifndef IS_SALAMANDER #ifndef IS_SALAMANDER
@ -269,7 +271,7 @@ static void frontend_xdk_get_environment_settings(int *argc, char *argv[],
#ifndef IS_SALAMANDER #ifndef IS_SALAMANDER
exit: exit:
global->verbosity = original_verbose; *verbose = original_verbose;
#endif #endif
} }
@ -310,9 +312,10 @@ static void frontend_xdk_exitspawn(char *s, size_t len)
static void frontend_xdk_exec(const char *path, bool should_load_game) static void frontend_xdk_exec(const char *path, bool should_load_game)
{ {
#ifndef IS_SALAMANDER #ifndef IS_SALAMANDER
global_t *global = global_get_ptr(); global_t *global = global_get_ptr();
bool original_verbose = global->verbosity; bool *verbose = retro_main_verbosity();
global->verbosity = true; bool original_verbose = *verbose;
*verbose = true;
#endif #endif
(void)should_load_game; (void)should_load_game;
@ -349,7 +352,7 @@ static void frontend_xdk_exec(const char *path, bool should_load_game)
#endif #endif
#endif #endif
#ifndef IS_SALAMANDER #ifndef IS_SALAMANDER
global->verbosity = original_verbose; *verbose = original_verbose;
#endif #endif
} }