subsystem: remember last used folder
This commit is contained in:
parent
a7e4d8359b
commit
319124c7a0
|
@ -103,6 +103,9 @@ unsigned content_get_subsystem_rom_id(void);
|
||||||
/* Set environment variables before a subsystem load */
|
/* Set environment variables before a subsystem load */
|
||||||
void content_set_subsystem_info(void);
|
void content_set_subsystem_info(void);
|
||||||
|
|
||||||
|
/* Get the path to the last selected subsystem rom */
|
||||||
|
char* content_get_subsystem_rom(unsigned index);
|
||||||
|
|
||||||
RETRO_END_DECLS
|
RETRO_END_DECLS
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -538,7 +538,10 @@ int generic_action_ok_displaylist_push(const char *path,
|
||||||
{
|
{
|
||||||
char game_dir[PATH_MAX_LENGTH];
|
char game_dir[PATH_MAX_LENGTH];
|
||||||
filebrowser_clear_type();
|
filebrowser_clear_type();
|
||||||
strlcpy(game_dir, path_get(RARCH_PATH_CONTENT), sizeof(game_dir));
|
if (content_get_subsystem_rom_id() > 0)
|
||||||
|
strlcpy(game_dir, content_get_subsystem_rom(content_get_subsystem_rom_id() - 1), sizeof(game_dir));
|
||||||
|
else
|
||||||
|
strlcpy(game_dir, path_get(RARCH_PATH_CONTENT), sizeof(game_dir));
|
||||||
path_basedir(game_dir);
|
path_basedir(game_dir);
|
||||||
|
|
||||||
if (content_get_subsystem() != type - MENU_SETTINGS_SUBSYSTEM_ADD)
|
if (content_get_subsystem() != type - MENU_SETTINGS_SUBSYSTEM_ADD)
|
||||||
|
|
|
@ -1838,6 +1838,11 @@ uint32_t content_get_crc(void)
|
||||||
return content_rom_crc;
|
return content_rom_crc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
char* content_get_subsystem_rom(unsigned index)
|
||||||
|
{
|
||||||
|
return pending_subsystem_roms[index];
|
||||||
|
}
|
||||||
|
|
||||||
bool content_is_inited(void)
|
bool content_is_inited(void)
|
||||||
{
|
{
|
||||||
return _content_is_inited;
|
return _content_is_inited;
|
||||||
|
|
Loading…
Reference in New Issue