From 6f32841647d31ae596e325213b2a08afa9b3c269 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Fri, 18 Jul 2014 00:39:31 +0200 Subject: [PATCH] Rename g_extern.verbose to g_extern.verbosity to avoid collisions on OSX --- audio/xaudio.c | 2 +- .../cascades/src/RetroArch-Cascades.cpp | 2 +- command.c | 6 +++--- frontend/frontend.c | 2 +- frontend/menu/backend/menu_common_backend.c | 4 ++-- frontend/menu/menu_common.c | 2 +- frontend/platform/platform_ps3.c | 18 +++++++++--------- frontend/platform/platform_psp.c | 4 ++-- frontend/platform/platform_wii.c | 6 +++--- frontend/platform/platform_xdk.c | 18 +++++++++--------- general.h | 2 +- retroarch.c | 4 ++-- retroarch_logger.h | 2 +- settings.c | 6 +++--- settings_data.c | 4 ++-- 15 files changed, 41 insertions(+), 41 deletions(-) diff --git a/audio/xaudio.c b/audio/xaudio.c index d0c6754ed0..9793da7290 100644 --- a/audio/xaudio.c +++ b/audio/xaudio.c @@ -54,7 +54,7 @@ static void *xa_init(const char *device, unsigned rate, unsigned latency) return NULL; } - if (g_extern.verbose) + if (g_extern.verbosity) xaudio2_enumerate_devices(xa->xa); return xa; diff --git a/blackberry-qnx/cascades/src/RetroArch-Cascades.cpp b/blackberry-qnx/cascades/src/RetroArch-Cascades.cpp index 96f3a47c60..a21cfb7805 100644 --- a/blackberry-qnx/cascades/src/RetroArch-Cascades.cpp +++ b/blackberry-qnx/cascades/src/RetroArch-Cascades.cpp @@ -56,7 +56,7 @@ RetroArch::RetroArch() : strlcpy(g_extern.config_path, "app/native/retroarch.cfg", sizeof(g_extern.config_path)); config_load(); strlcpy(g_settings.libretro, "app/native/lib", sizeof(g_settings.libretro)); - g_extern.verbose = 1; + g_extern.verbosity = 1; coreSelectedIndex = -1; //Stop config overwritting values diff --git a/command.c b/command.c index 93e0a52111..054d53694d 100644 --- a/command.c +++ b/command.c @@ -577,8 +577,8 @@ bool network_cmd_send(const char *cmd_) if (!command) return false; - bool old_verbose = g_extern.verbose; - g_extern.verbose = true; + bool old_verbose = g_extern.verbosity; + g_extern.verbosity = true; const char *cmd = NULL; const char *host = NULL; @@ -609,7 +609,7 @@ bool network_cmd_send(const char *cmd_) bool ret = verify_command(cmd) && send_udp_packet(host, port, cmd); free(command); - g_extern.verbose = old_verbose; + g_extern.verbosity = old_verbose; return ret; } #endif diff --git a/frontend/frontend.c b/frontend/frontend.c index fd574786aa..d0c830467d 100644 --- a/frontend/frontend.c +++ b/frontend/frontend.c @@ -338,7 +338,7 @@ returntype main_entry(signature()) if (wrap_args->touched) { - g_extern.verbose = true; + g_extern.verbosity = true; rarch_main_init_wrap(wrap_args, &rarch_argc, rarch_argv); memcpy(argv_copy, rarch_argv, sizeof(rarch_argv)); rarch_argv_ptr = (char**)rarch_argv; diff --git a/frontend/menu/backend/menu_common_backend.c b/frontend/menu/backend/menu_common_backend.c index 45e9b45082..295fd040bf 100644 --- a/frontend/menu/backend/menu_common_backend.c +++ b/frontend/menu/backend/menu_common_backend.c @@ -140,7 +140,7 @@ static void menu_common_entries_init(void *data, unsigned menu_type) file_list_push(menu->selection_buf, "Libretro Logging Level", MENU_SETTINGS_LIBRETRO_LOG_LEVEL, 0); if ((current_setting = (rarch_setting_t*)setting_data_find_setting(setting_data, "log_verbosity"))) { - *current_setting->value.boolean = g_extern.verbose; + *current_setting->value.boolean = g_extern.verbosity; file_list_push(menu->selection_buf, current_setting->short_description, MENU_SETTINGS_LOGGING_VERBOSITY, 0); } if ((current_setting = (rarch_setting_t*)setting_data_find_setting(setting_data, "perfcnt_enable"))) @@ -5174,7 +5174,7 @@ static void menu_common_setting_set_label(char *type_str, size_t type_str_size, } break; case MENU_SETTINGS_LOGGING_VERBOSITY: - strlcpy(type_str, g_extern.verbose ? "ON" : "OFF", type_str_size); + strlcpy(type_str, g_extern.verbosity ? "ON" : "OFF", type_str_size); break; case MENU_SETTINGS_PERFORMANCE_COUNTERS_ENABLE: strlcpy(type_str, g_extern.perfcnt_enable ? "ON" : "OFF", type_str_size); diff --git a/frontend/menu/menu_common.c b/frontend/menu/menu_common.c index 093e934874..8ecbb734c6 100644 --- a/frontend/menu/menu_common.c +++ b/frontend/menu/menu_common.c @@ -257,7 +257,7 @@ bool load_menu_game(void) return false; args.no_rom = driver.menu->load_no_rom; - args.verbose = g_extern.verbose; + args.verbose = g_extern.verbosity; args.config_path = *g_extern.config_path ? g_extern.config_path : NULL; args.sram_path = *g_extern.savefile_dir ? g_extern.savefile_dir : NULL; args.state_path = *g_extern.savestate_dir ? g_extern.savestate_dir : NULL; diff --git a/frontend/platform/platform_ps3.c b/frontend/platform/platform_ps3.c index 37bd64bbb5..e03293fc6f 100644 --- a/frontend/platform/platform_ps3.c +++ b/frontend/platform/platform_ps3.c @@ -80,8 +80,8 @@ static void frontend_ps3_get_environment_settings(int *argc, char *argv[], void *args, void *params_data) { #ifndef IS_SALAMANDER - bool original_verbose = g_extern.verbose; - g_extern.verbose = true; + bool original_verbose = g_extern.verbosity; + g_extern.verbosity = true; #endif (void)args; @@ -204,7 +204,7 @@ static void frontend_ps3_get_environment_settings(int *argc, char *argv[], } #ifndef IS_SALAMANDER - g_extern.verbose = original_verbose; + g_extern.verbosity = original_verbose; #endif } @@ -306,8 +306,8 @@ static void frontend_ps3_exitspawn(char *core_path, size_t core_path_size) bool should_load_game = false; #ifndef IS_SALAMANDER - bool original_verbose = g_extern.verbose; - g_extern.verbose = true; + bool original_verbose = g_extern.verbosity; + g_extern.verbosity = true; #ifdef HAVE_MULTIMAN if (g_extern.lifecycle_state & (1ULL << MODE_EXITSPAWN_MULTIMAN)) @@ -332,7 +332,7 @@ static void frontend_ps3_exitspawn(char *core_path, size_t core_path_size) #endif #ifndef IS_SALAMANDER - g_extern.verbose = original_verbose; + g_extern.verbosity = original_verbose; #endif #endif } @@ -353,8 +353,8 @@ static void frontend_ps3_exec(const char *path, bool should_load_game) (void)should_load_game; char spawn_data[256]; #ifndef IS_SALAMANDER - bool original_verbose = g_extern.verbose; - g_extern.verbose = true; + bool original_verbose = g_extern.verbosity; + g_extern.verbosity = true; char game_path[256]; game_path[0] = '\0'; @@ -414,7 +414,7 @@ static void frontend_ps3_exec(const char *path, bool should_load_game) cellSysmoduleUnloadModule(CELL_SYSMODULE_NET); #ifndef IS_SALAMANDER - g_extern.verbose = original_verbose; + g_extern.verbosity = original_verbose; #endif } diff --git a/frontend/platform/platform_psp.c b/frontend/platform/platform_psp.c index d6366b7e99..ed9d89049a 100644 --- a/frontend/platform/platform_psp.c +++ b/frontend/platform/platform_psp.c @@ -51,7 +51,7 @@ static void frontend_psp_get_environment_settings(int *argc, char *argv[], { (void)args; #ifndef IS_SALAMANDER - g_extern.verbose = true; + g_extern.verbosity = true; #if defined(HAVE_LOGGER) logger_init(); @@ -105,7 +105,7 @@ static void frontend_psp_deinit(void *data) { (void)data; #ifndef IS_SALAMANDER - g_extern.verbose = false; + g_extern.verbosity = false; #ifdef HAVE_FILE_LOGGER if (g_extern.log_file) diff --git a/frontend/platform/platform_wii.c b/frontend/platform/platform_wii.c index 8ceef19233..dcca1af27a 100644 --- a/frontend/platform/platform_wii.c +++ b/frontend/platform/platform_wii.c @@ -109,8 +109,8 @@ static void dol_copy_argv_path(const char *dolpath, const char *argpath) void system_exec_wii(const char *_path, bool should_load_game) { #ifndef IS_SALAMANDER - bool original_verbose = g_extern.verbose; - g_extern.verbose = true; + bool original_verbose = g_extern.verbosity; + g_extern.verbosity = true; #endif char path[PATH_MAX]; @@ -176,6 +176,6 @@ void system_exec_wii(const char *_path, bool should_load_game) exit: (void)0; #ifndef IS_SALAMANDER - g_extern.verbose = original_verbose; + g_extern.verbosity = original_verbose; #endif } diff --git a/frontend/platform/platform_xdk.c b/frontend/platform/platform_xdk.c index a6690927b2..e2c79189c8 100644 --- a/frontend/platform/platform_xdk.c +++ b/frontend/platform/platform_xdk.c @@ -35,8 +35,8 @@ static HRESULT xbox_io_mount(char *szDrive, char *szDevice) { #ifndef IS_SALAMANDER - bool original_verbose = g_extern.verbose; - g_extern.verbose = true; + bool original_verbose = g_extern.verbosity; + g_extern.verbosity = true; #endif char szSourceDevice[48]; char szDestinationDrive[16]; @@ -63,7 +63,7 @@ static HRESULT xbox_io_mount(char *szDrive, char *szDevice) IoCreateSymbolicLink(&LinkName, &DeviceName); #ifndef IS_SALAMANDER - g_extern.verbose = original_verbose; + g_extern.verbosity = original_verbose; #endif return S_OK; } @@ -93,8 +93,8 @@ static void frontend_xdk_get_environment_settings(int *argc, char *argv[], (void)ret; #ifndef IS_SALAMANDER - bool original_verbose = g_extern.verbose; - g_extern.verbose = true; + bool original_verbose = g_extern.verbosity; + g_extern.verbosity = true; #endif #ifndef IS_SALAMANDER @@ -223,7 +223,7 @@ static void frontend_xdk_get_environment_settings(int *argc, char *argv[], #ifndef IS_SALAMANDER exit: - g_extern.verbose = original_verbose; + g_extern.verbosity = original_verbose; #endif } @@ -262,8 +262,8 @@ static void frontend_xdk_exitspawn(char *core_path, size_t sizeof_core_path) static void frontend_xdk_exec(const char *path, bool should_load_game) { #ifndef IS_SALAMANDER - bool original_verbose = g_extern.verbose; - g_extern.verbose = true; + bool original_verbose = g_extern.verbosity; + g_extern.verbosity = true; #endif (void)should_load_game; @@ -293,7 +293,7 @@ static void frontend_xdk_exec(const char *path, bool should_load_game) #endif #endif #ifndef IS_SALAMANDER - g_extern.verbose = original_verbose; + g_extern.verbosity = original_verbose; #endif } diff --git a/general.h b/general.h index 6cf01e9e64..c22995c490 100644 --- a/general.h +++ b/general.h @@ -363,7 +363,7 @@ typedef struct rarch_viewport // All run-time- / command line flag-related globals go here. struct global { - bool verbose; + bool verbosity; bool perfcnt_enable; bool audio_active; bool video_active; diff --git a/retroarch.c b/retroarch.c index b572e70eff..de737f7ce0 100644 --- a/retroarch.c +++ b/retroarch.c @@ -1059,7 +1059,7 @@ static void parse_input(int argc, char *argv[]) break; case 'v': - g_extern.verbose = true; + g_extern.verbosity = true; g_extern.has_set_verbosity = true; break; @@ -2905,7 +2905,7 @@ int rarch_main_init(int argc, char *argv[]) g_extern.error_in_init = true; parse_input(argc, argv); - if (g_extern.verbose) + if (g_extern.verbosity) { RARCH_LOG_OUTPUT("=== Build ======================================="); print_compiler(stderr); diff --git a/retroarch_logger.h b/retroarch_logger.h index 50d46b3037..7fbf8a1e30 100644 --- a/retroarch_logger.h +++ b/retroarch_logger.h @@ -42,7 +42,7 @@ #if defined(RARCH_DUMMY_LOG) || !defined(RARCH_INTERNAL) #define RARCH_LOG_VERBOSE (true) #else -#define RARCH_LOG_VERBOSE g_extern.verbose +#define RARCH_LOG_VERBOSE g_extern.verbosity #endif #ifndef RARCH_LOG diff --git a/settings.c b/settings.c index 09aff4d999..5143db3acb 100644 --- a/settings.c +++ b/settings.c @@ -799,7 +799,7 @@ bool config_load_file(const char *path, bool set_defaults) extra_path = strtok_r(NULL, ";", &save); } - if (g_extern.verbose) + if (g_extern.verbosity) { RARCH_LOG_OUTPUT("=== Config ===\n"); config_file_dump_all(conf); @@ -1046,7 +1046,7 @@ bool config_load_file(const char *path, bool set_defaults) CONFIG_GET_INT(libretro_log_level, "libretro_log_level"); if (!g_extern.has_set_verbosity) - CONFIG_GET_BOOL_EXTERN(verbose, "log_verbosity"); + CONFIG_GET_BOOL_EXTERN(verbosity, "log_verbosity"); CONFIG_GET_BOOL_EXTERN(perfcnt_enable, "perfcnt_enable"); @@ -1506,7 +1506,7 @@ bool config_save_file(const char *path) config_set_bool(conf, "core_specific_config", g_settings.core_specific_config); config_set_int(conf, "libretro_log_level", g_settings.libretro_log_level); - config_set_bool(conf, "log_verbosity", g_extern.verbose); + config_set_bool(conf, "log_verbosity", g_extern.verbosity); config_set_bool(conf, "perfcnt_enable", g_extern.perfcnt_enable); bool ret = config_file_write(conf, path); diff --git a/settings_data.c b/settings_data.c index 576f3cd55f..ba949404b5 100644 --- a/settings_data.c +++ b/settings_data.c @@ -744,7 +744,7 @@ static void general_change_handler(const void *data) g_extern.netplay_is_spectate = *setting->value.boolean; #endif else if (!strcmp(setting->name, "log_verbosity")) - g_extern.verbose = *setting->value.boolean; + g_extern.verbosity = *setting->value.boolean; else if (!strcmp(setting->name, "perfcnt_enable")) g_extern.perfcnt_enable = *setting->value.boolean; } @@ -835,7 +835,7 @@ rarch_setting_t* setting_data_get_list(void) /*******************/ START_GROUP("General Options") START_SUB_GROUP("General Options") - CONFIG_BOOL(g_extern.verbose, "log_verbosity", "Logging Verbosity", false, GROUP_NAME, SUBGROUP_NAME, general_change_handler) + CONFIG_BOOL(g_extern.verbosity, "log_verbosity", "Logging Verbosity", false, GROUP_NAME, SUBGROUP_NAME, general_change_handler) CONFIG_BOOL(g_extern.perfcnt_enable, "perfcnt_enable", "Performance Counters", false, GROUP_NAME, SUBGROUP_NAME, general_change_handler) CONFIG_BOOL(g_extern.config_save_on_exit, "config_save_on_exit", "Configuration Save On Exit", config_save_on_exit, GROUP_NAME, SUBGROUP_NAME, general_change_handler) CONFIG_BOOL(g_settings.fps_show, "fps_show", "Show Framerate", fps_show, GROUP_NAME, SUBGROUP_NAME, general_change_handler)