From 59f8e75ee1e1f505872fea3073f3779f060bc449 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Mon, 28 Jul 2014 19:37:25 +0200 Subject: [PATCH] Rename load_no_rom to load_no_content --- driver_menu.h | 2 +- dynamic.c | 22 ++++++++++----------- dynamic.h | 4 ++-- frontend/menu/backend/menu_common_backend.c | 4 ++-- frontend/menu/menu_common.c | 10 +++++----- frontend/menu/menu_common.h | 2 +- retroarch.c | 4 ++-- 7 files changed, 24 insertions(+), 24 deletions(-) diff --git a/driver_menu.h b/driver_menu.h index 09db5fcc2a..0b375eb05a 100644 --- a/driver_menu.h +++ b/driver_menu.h @@ -156,7 +156,7 @@ typedef struct bool alloc_font; struct retro_system_info info; - bool load_no_rom; + bool load_no_content; struct gfx_shader *shader; struct gfx_shader *parameter_shader; // Points to either shader or graphics driver current shader. diff --git a/dynamic.c b/dynamic.c index 750282d598..b4fdd44e68 100644 --- a/dynamic.c +++ b/dynamic.c @@ -100,13 +100,13 @@ size_t (*pretro_get_memory_size)(unsigned); #define DYNAMIC_EXT "so" #endif -static bool *load_no_rom_hook; +static bool *load_no_content_hook; static bool environ_cb_get_system_info(unsigned cmd, void *data) { switch (cmd) { case RETRO_ENVIRONMENT_SET_SUPPORT_NO_GAME: - *load_no_rom_hook = *(const bool*)data; + *load_no_content_hook = *(const bool*)data; break; default: @@ -116,15 +116,15 @@ static bool environ_cb_get_system_info(unsigned cmd, void *data) return true; } -void libretro_get_environment_info(void (*func)(retro_environment_t), bool *load_no_rom) +void libretro_get_environment_info(void (*func)(retro_environment_t), bool *load_no_content) { - load_no_rom_hook = load_no_rom; + load_no_content_hook = load_no_content; - // load_no_rom gets set in this callback. + // load_no_content gets set in this callback. func(environ_cb_get_system_info); } -static dylib_t libretro_get_system_info_lib(const char *path, struct retro_system_info *info, bool *load_no_rom) +static dylib_t libretro_get_system_info_lib(const char *path, struct retro_system_info *info, bool *load_no_content) { dylib_t lib = dylib_load(path); if (!lib) @@ -141,26 +141,26 @@ static dylib_t libretro_get_system_info_lib(const char *path, struct retro_syste proc(info); - if (load_no_rom) + if (load_no_content) { - *load_no_rom = false; + *load_no_content = false; void (*set_environ)(retro_environment_t) = (void (*)(retro_environment_t))dylib_proc(lib, "retro_set_environment"); if (!set_environ) return lib; - libretro_get_environment_info(set_environ, load_no_rom); + libretro_get_environment_info(set_environ, load_no_content); } return lib; } bool libretro_get_system_info(const char *path, struct retro_system_info *info, - bool *load_no_rom) + bool *load_no_content) { struct retro_system_info dummy_info = {0}; - dylib_t lib = libretro_get_system_info_lib(path, &dummy_info, load_no_rom); + dylib_t lib = libretro_get_system_info_lib(path, &dummy_info, load_no_content); if (!lib) return false; diff --git a/dynamic.h b/dynamic.h index 68494516dc..a4451a825b 100644 --- a/dynamic.h +++ b/dynamic.h @@ -52,12 +52,12 @@ function_t dylib_proc(dylib_t lib, const char *proc); // the "real" environ callback. // // For statically linked cores, pass retro_set_environment as argument. -void libretro_get_environment_info(void (*)(retro_environment_t), bool *load_no_rom); +void libretro_get_environment_info(void (*)(retro_environment_t), bool *load_no_content); #ifdef HAVE_DYNAMIC // Gets system info from an arbitrary lib. // The struct returned must be freed as strings are allocated dynamically. -bool libretro_get_system_info(const char *path, struct retro_system_info *info, bool *load_no_rom); +bool libretro_get_system_info(const char *path, struct retro_system_info *info, bool *load_no_content); void libretro_free_system_info(struct retro_system_info *info); #endif diff --git a/frontend/menu/backend/menu_common_backend.c b/frontend/menu/backend/menu_common_backend.c index f8c595d03d..65ce0d7169 100644 --- a/frontend/menu/backend/menu_common_backend.c +++ b/frontend/menu/backend/menu_common_backend.c @@ -2441,8 +2441,8 @@ static int menu_common_iterate(unsigned action) fill_pathname_join(g_settings.libretro, dir, path, sizeof(g_settings.libretro)); rarch_main_command(RARCH_CMD_LOAD_CORE); #if defined(HAVE_DYNAMIC) - // No ROM needed for this core, load game immediately. - if (driver.menu->load_no_rom) + // No content needed for this core, load core immediately. + if (driver.menu->load_no_content) { g_extern.lifecycle_state |= (1ULL << MODE_LOAD_GAME); *g_extern.fullpath = '\0'; diff --git a/frontend/menu/menu_common.c b/frontend/menu/menu_common.c index f02018840d..f17f2fd8c2 100644 --- a/frontend/menu/menu_common.c +++ b/frontend/menu/menu_common.c @@ -17,13 +17,13 @@ #include "menu_common.h" #include "../frontend.h" -void menu_update_system_info(menu_handle_t *menu, bool *load_no_rom) +void menu_update_system_info(menu_handle_t *menu, bool *load_no_content) { #ifdef HAVE_DYNAMIC libretro_free_system_info(&menu->info); if (*g_settings.libretro) { - libretro_get_system_info(g_settings.libretro, &menu->info, load_no_rom); + libretro_get_system_info(g_settings.libretro, &menu->info, load_no_content); #endif // Keep track of info for the currently selected core. if (menu->core_info) @@ -104,7 +104,7 @@ static void load_menu_content_prepare(void) if (!driver.menu) return; - if (*g_extern.fullpath || driver.menu->load_no_rom) + if (*g_extern.fullpath || driver.menu->load_no_content) { if (*g_extern.fullpath) { @@ -156,7 +156,7 @@ void load_menu_content_history(unsigned game_index) strlcpy(g_settings.libretro, core_path, sizeof(g_settings.libretro)); - driver.menu->load_no_rom = (path) ? false : true; + driver.menu->load_no_content = (path) ? false : true; rarch_environment_cb(RETRO_ENVIRONMENT_EXEC, (void*)path); @@ -183,7 +183,7 @@ static void menu_environment_get(int *argc, char *argv[], void *args, void *para { struct rarch_main_wrap *wrap_args = (struct rarch_main_wrap*)params_data; - wrap_args->no_rom = driver.menu->load_no_rom; + wrap_args->no_rom = driver.menu->load_no_content; wrap_args->verbose = g_extern.verbosity; wrap_args->config_path = *g_extern.config_path ? g_extern.config_path : NULL; wrap_args->sram_path = *g_extern.savefile_dir ? g_extern.savefile_dir : NULL; diff --git a/frontend/menu/menu_common.h b/frontend/menu/menu_common.h index f2826e1f4c..877667f015 100644 --- a/frontend/menu/menu_common.h +++ b/frontend/menu/menu_common.h @@ -116,7 +116,7 @@ int menu_defer_core(core_info_list_t *data, const char *dir, const char *path, c uint64_t menu_input(void); void menu_flush_stack_type(unsigned final_type); -void menu_update_system_info(menu_handle_t *menu, bool *load_no_rom); +void menu_update_system_info(menu_handle_t *menu, bool *load_no_content); void menu_build_scroll_indices(file_list_t *buf); #ifdef __cplusplus diff --git a/retroarch.c b/retroarch.c index 6e847d7c15..5e013be862 100644 --- a/retroarch.c +++ b/retroarch.c @@ -3091,7 +3091,7 @@ void rarch_main_command(unsigned action) break; case RARCH_CMD_LOAD_CORE: #ifdef HAVE_MENU - menu_update_system_info(driver.menu, &driver.menu->load_no_rom); + menu_update_system_info(driver.menu, &driver.menu->load_no_content); #endif break; case RARCH_CMD_LOAD_STATE: @@ -3123,7 +3123,7 @@ void rarch_main_command(unsigned action) #ifdef HAVE_MENU if (driver.menu) - driver.menu->load_no_rom = false; + driver.menu->load_no_content = false; #endif g_extern.lifecycle_state |= (1ULL << MODE_LOAD_GAME);