Rename load_no_rom to load_no_content

This commit is contained in:
twinaphex 2014-07-28 19:37:25 +02:00
parent dae3ce8389
commit 59f8e75ee1
7 changed files with 24 additions and 24 deletions

View File

@ -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.

View File

@ -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;

View File

@ -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

View File

@ -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';

View File

@ -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;

View File

@ -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

View File

@ -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);