mirror of
https://github.com/libretro/RetroArch
synced 2025-03-15 13:21:29 +00:00
Change signature of rarch_system_info_get_ptr
This commit is contained in:
parent
67ffbe7cef
commit
42fcb4490c
@ -1761,14 +1761,14 @@ bool config_load_override(void)
|
||||
bool should_append = false;
|
||||
global_t *global = global_get_ptr();
|
||||
settings_t *settings = config_get_ptr();
|
||||
struct retro_system_info *info = rarch_system_info_get_ptr();
|
||||
rarch_system_info_t *info = rarch_system_info_get_ptr();
|
||||
|
||||
/* Early return in case a library isn't loaded */
|
||||
if (!info->library_name || !strcmp(info->library_name,"No Core"))
|
||||
if (!info->info.library_name || !strcmp(info->info.library_name,"No Core"))
|
||||
return false;
|
||||
|
||||
RARCH_LOG("Game name: %s\n", global->basename);
|
||||
RARCH_LOG("Core name: %s\n", info->library_name);
|
||||
RARCH_LOG("Core name: %s\n", info->info.library_name);
|
||||
|
||||
if (!global || !settings )
|
||||
{
|
||||
@ -1791,7 +1791,7 @@ bool config_load_override(void)
|
||||
|
||||
RARCH_LOG("Config directory: %s\n", config_directory);
|
||||
|
||||
core_name = info->library_name;
|
||||
core_name = info->info.library_name;
|
||||
game_name = path_basename(global->basename);
|
||||
|
||||
/* Concatenate strings into full paths for core_path, game_path */
|
||||
@ -1944,14 +1944,14 @@ bool config_load_remap(void)
|
||||
char game_path[PATH_MAX_LENGTH] = {0}; /* final path for game-specific configuration (prefix+suffix) */
|
||||
global_t *global = global_get_ptr();
|
||||
settings_t *settings = config_get_ptr();
|
||||
struct retro_system_info *info = rarch_system_info_get_ptr();
|
||||
rarch_system_info_t *info = rarch_system_info_get_ptr();
|
||||
|
||||
/* Early return in case a library isn't loaded or remapping is disabled */
|
||||
if (!info->library_name || !strcmp(info->library_name,"No Core"))
|
||||
if (!info->info.library_name || !strcmp(info->info.library_name,"No Core"))
|
||||
return false;
|
||||
|
||||
RARCH_LOG("Game name: %s\n", global->basename);
|
||||
RARCH_LOG("Core name: %s\n", info->library_name);
|
||||
RARCH_LOG("Core name: %s\n", info->info.library_name);
|
||||
|
||||
/* Remap directory: remap_directory.
|
||||
* Try remap directory setting, no fallbacks defined */
|
||||
@ -1964,7 +1964,7 @@ bool config_load_remap(void)
|
||||
}
|
||||
RARCH_LOG("Remap directory: %s\n", remap_directory);
|
||||
|
||||
core_name = info->library_name;
|
||||
core_name = info->info.library_name;
|
||||
game_name = path_basename(global->basename);
|
||||
|
||||
/* Concatenate strings into full paths for core_path, game_path */
|
||||
|
12
content.c
12
content.c
@ -366,9 +366,9 @@ static bool load_content_need_fullpath(
|
||||
bool ret = false;
|
||||
settings_t *settings = config_get_ptr();
|
||||
global_t *global = global_get_ptr();
|
||||
struct retro_system_info *sys_info= rarch_system_info_get_ptr();
|
||||
rarch_system_info_t *sys_info= rarch_system_info_get_ptr();
|
||||
|
||||
if (sys_info && sys_info->block_extract)
|
||||
if (sys_info && sys_info->info.block_extract)
|
||||
return true;
|
||||
|
||||
if (!need_fullpath)
|
||||
@ -519,7 +519,7 @@ bool init_content_file(void)
|
||||
struct string_list *content = NULL;
|
||||
const struct retro_subsystem_info *special = NULL;
|
||||
settings_t *settings = config_get_ptr();
|
||||
struct retro_system_info *info = rarch_system_info_get_ptr();
|
||||
rarch_system_info_t *info = rarch_system_info_get_ptr();
|
||||
global_t *global = global_get_ptr();
|
||||
|
||||
global->temporary_content = string_list_new();
|
||||
@ -583,8 +583,8 @@ bool init_content_file(void)
|
||||
}
|
||||
else
|
||||
{
|
||||
attr.i = info->block_extract;
|
||||
attr.i |= info->need_fullpath << 1;
|
||||
attr.i = info->info.block_extract;
|
||||
attr.i |= info->info.need_fullpath << 1;
|
||||
attr.i |= (!global->system.no_content) << 2;
|
||||
string_list_append(content,
|
||||
(global->libretro_no_content && settings->core.set_supports_no_game_enable) ? "" : global->fullpath, attr);
|
||||
@ -603,7 +603,7 @@ bool init_content_file(void)
|
||||
|
||||
ext = path_get_extension(content->elems[i].data);
|
||||
valid_ext = special ? special->roms[i].valid_extensions :
|
||||
info->valid_extensions;
|
||||
info->info.valid_extensions;
|
||||
|
||||
if (ext && !strcasecmp(ext, "zip"))
|
||||
{
|
||||
|
@ -315,14 +315,15 @@ int rarch_main(int argc, char *argv[], void *data)
|
||||
|
||||
if (settings->history_list_enable)
|
||||
{
|
||||
global_t *global = global_get_ptr();
|
||||
global_t *global = global_get_ptr();
|
||||
rarch_system_info_t *sysinfo = rarch_system_info_get_ptr();
|
||||
|
||||
if (global->content_is_init || global->system.no_content)
|
||||
history_playlist_push(
|
||||
g_defaults.history,
|
||||
global->fullpath,
|
||||
settings->libretro,
|
||||
rarch_system_info_get_ptr());
|
||||
sysinfo ? &sysinfo->info : NULL);
|
||||
}
|
||||
|
||||
if (driver)
|
||||
|
@ -786,8 +786,8 @@ static int action_ok_remap_file_save_core(const char *path,
|
||||
char file[PATH_MAX_LENGTH] = {0};
|
||||
global_t *global = global_get_ptr();
|
||||
settings_t *settings = config_get_ptr();
|
||||
struct retro_system_info *info = rarch_system_info_get_ptr();
|
||||
const char *core_name = info ? info->library_name : NULL;
|
||||
rarch_system_info_t *info = rarch_system_info_get_ptr();
|
||||
const char *core_name = info ? info->info.library_name : NULL;
|
||||
|
||||
fill_pathname_join(directory,settings->input_remapping_directory,core_name,PATH_MAX_LENGTH);
|
||||
fill_pathname_join(file,core_name,core_name,PATH_MAX_LENGTH);
|
||||
@ -810,8 +810,8 @@ static int action_ok_remap_file_save_game(const char *path,
|
||||
char file[PATH_MAX_LENGTH] = {0};
|
||||
global_t *global = global_get_ptr();
|
||||
settings_t *settings = config_get_ptr();
|
||||
struct retro_system_info *info = rarch_system_info_get_ptr();
|
||||
const char *core_name = info ? info->library_name : NULL;
|
||||
rarch_system_info_t *info = rarch_system_info_get_ptr();
|
||||
const char *core_name = info ? info->info.library_name : NULL;
|
||||
const char *game_name = global ? path_basename(global->basename) : NULL;
|
||||
|
||||
fill_pathname_join(directory,settings->input_remapping_directory,core_name,PATH_MAX_LENGTH);
|
||||
|
@ -105,15 +105,15 @@ void menu_entries_get_core_title(char *s, size_t len)
|
||||
global_t *global = global_get_ptr();
|
||||
const char *core_name = global ? global->menu.info.library_name : NULL;
|
||||
const char *core_version = global ? global->menu.info.library_version : NULL;
|
||||
struct retro_system_info *info = rarch_system_info_get_ptr();
|
||||
rarch_system_info_t *info = rarch_system_info_get_ptr();
|
||||
|
||||
if (!core_name || core_name[0] == '\0')
|
||||
core_name = info->library_name;
|
||||
core_name = info->info.library_name;
|
||||
if (!core_name || core_name[0] == '\0')
|
||||
core_name = menu_hash_to_str(MENU_VALUE_NO_CORE);
|
||||
|
||||
if (!core_version)
|
||||
core_version = info->library_version;
|
||||
core_version = info->info.library_version;
|
||||
if (!core_version)
|
||||
core_version = "";
|
||||
|
||||
|
@ -820,8 +820,8 @@ static uint32_t implementation_magic_value(void)
|
||||
const char *ver = PACKAGE_VERSION;
|
||||
unsigned api = pretro_api_version();
|
||||
global_t *global = global_get_ptr();
|
||||
struct retro_system_info *info = rarch_system_info_get_ptr();
|
||||
const char *lib = info ? info->library_name : NULL;
|
||||
rarch_system_info_t *info = rarch_system_info_get_ptr();
|
||||
const char *lib = info ? info->info.library_name : NULL;
|
||||
|
||||
res |= api;
|
||||
|
||||
@ -829,7 +829,7 @@ static uint32_t implementation_magic_value(void)
|
||||
for (i = 0; i < len; i++)
|
||||
res ^= lib[i] << (i & 0xf);
|
||||
|
||||
lib = info->library_version;
|
||||
lib = info->info.library_version;
|
||||
len = strlen(lib);
|
||||
|
||||
for (i = 0; i < len; i++)
|
||||
|
38
retroarch.c
38
retroarch.c
@ -317,23 +317,23 @@ static void set_special_paths(char **argv, unsigned num_content)
|
||||
sizeof(settings->system_directory));
|
||||
}
|
||||
|
||||
struct retro_system_info *rarch_system_info_get_ptr(void)
|
||||
rarch_system_info_t *rarch_system_info_get_ptr(void)
|
||||
{
|
||||
global_t *global = global_get_ptr();
|
||||
if (!global)
|
||||
return NULL;
|
||||
return &global->system.info;
|
||||
return &global->system;
|
||||
}
|
||||
|
||||
void set_paths_redirect(const char *path)
|
||||
{
|
||||
global_t *global = global_get_ptr();
|
||||
settings_t *settings = config_get_ptr();
|
||||
struct retro_system_info *info = rarch_system_info_get_ptr();
|
||||
rarch_system_info_t *info = rarch_system_info_get_ptr();
|
||||
|
||||
uint32_t global_library_name_hash = ((global && info->library_name &&
|
||||
(info->library_name[0] != '\0'))
|
||||
? djb2_calculate(info->library_name) : 0);
|
||||
uint32_t global_library_name_hash = ((global && info->info.library_name &&
|
||||
(info->info.library_name[0] != '\0'))
|
||||
? djb2_calculate(info->info.library_name) : 0);
|
||||
|
||||
if(
|
||||
global_library_name_hash != 0 &&
|
||||
@ -346,7 +346,7 @@ void set_paths_redirect(const char *path)
|
||||
fill_pathname_dir(
|
||||
global->savefile_dir,
|
||||
global->savefile_dir,
|
||||
info->library_name,
|
||||
info->info.library_name,
|
||||
sizeof(global->savefile_dir));
|
||||
|
||||
// if path doesn't exist try to create it, if everything fails revert to the original path
|
||||
@ -365,7 +365,7 @@ void set_paths_redirect(const char *path)
|
||||
sizeof(global->savestate_dir));
|
||||
fill_pathname_dir(global->savestate_dir,
|
||||
global->savestate_dir,
|
||||
info->library_name,
|
||||
info->info.library_name,
|
||||
sizeof(global->savestate_dir));
|
||||
|
||||
/* If path doesn't exist, try to create it.
|
||||
@ -1103,26 +1103,26 @@ void rarch_main_free(void)
|
||||
static void init_system_info(void)
|
||||
{
|
||||
global_t *global = global_get_ptr();
|
||||
struct retro_system_info *info = rarch_system_info_get_ptr();
|
||||
rarch_system_info_t *info = rarch_system_info_get_ptr();
|
||||
|
||||
pretro_get_system_info(info);
|
||||
pretro_get_system_info(&info->info);
|
||||
|
||||
if (!info->library_name)
|
||||
info->library_name = "Unknown";
|
||||
if (!info->library_version)
|
||||
info->library_version = "v0";
|
||||
if (!info->info.library_name)
|
||||
info->info.library_name = "Unknown";
|
||||
if (!info->info.library_version)
|
||||
info->info.library_version = "v0";
|
||||
|
||||
#ifndef RARCH_CONSOLE
|
||||
snprintf(global->title_buf, sizeof(global->title_buf),
|
||||
RETRO_FRONTEND " : ");
|
||||
#endif
|
||||
strlcat(global->title_buf, info->library_name, sizeof(global->title_buf));
|
||||
strlcat(global->title_buf, info->info.library_name, sizeof(global->title_buf));
|
||||
strlcat(global->title_buf, " ", sizeof(global->title_buf));
|
||||
strlcat(global->title_buf, info->library_version, sizeof(global->title_buf));
|
||||
strlcpy(global->system.valid_extensions, info->valid_extensions ?
|
||||
info->valid_extensions : DEFAULT_EXT,
|
||||
strlcat(global->title_buf, info->info.library_version, sizeof(global->title_buf));
|
||||
strlcpy(global->system.valid_extensions, info->info.valid_extensions ?
|
||||
info->info.valid_extensions : DEFAULT_EXT,
|
||||
sizeof(global->system.valid_extensions));
|
||||
global->system.block_extract = info->block_extract;
|
||||
global->system.block_extract = info->info.block_extract;
|
||||
}
|
||||
|
||||
/*
|
||||
|
Loading…
x
Reference in New Issue
Block a user