subsystem part 2: set paths

This commit is contained in:
radius 2018-02-10 21:42:41 -05:00
parent b212640732
commit 752e729ec2
3 changed files with 5 additions and 2 deletions

View File

@ -41,6 +41,7 @@ typedef struct content_ctx_info
int pending_subsystem;
int pending_subsystem_rom_id;
int pending_subsystem_rom_num;
char pending_subsystem_ident[255];
char pending_subsystem_extensions[PATH_MAX_LENGTH];

View File

@ -458,7 +458,8 @@ int generic_action_ok_displaylist_push(const char *path,
break;
case ACTION_OK_DL_SUBSYSTEM_LOAD:
filebrowser_clear_type();
RARCH_LOG("LOADING!!!!!!!\n");
path_set(RARCH_PATH_SUBSYSTEM, pending_subsystem_ident);
path_set_special((char**)pending_subsystem_roms, pending_subsystem_rom_num);
break;
case ACTION_OK_DL_CHEAT_FILE:
filebrowser_clear_type();

View File

@ -776,7 +776,6 @@ static bool content_file_init(
const struct retro_subsystem_info *special =
path_is_empty(RARCH_PATH_SUBSYSTEM)
? NULL : content_file_init_subsystem(content_ctx, error_string, &ret);
if ( !ret ||
!content_file_init_set_attribs(content, special, content_ctx, error_string))
return false;
@ -788,6 +787,7 @@ static bool content_file_init(
{
unsigned i;
struct string_list *additional_path_allocs = string_list_new();
ret = content_file_load(info, content, content_ctx, error_string,
special, additional_path_allocs);
string_list_free(additional_path_allocs);
@ -1688,6 +1688,7 @@ void content_set_subsystem(unsigned sub)
subsystem = system->subsystem.data + pending_subsystem;
strlcpy(pending_subsystem_ident, subsystem->ident, sizeof(pending_subsystem_ident));
pending_subsystem_rom_num = subsystem->num_roms;
}
/* Add a rom to the subsystem rom buffer */