mirror of
https://github.com/libretro/parallel-gx2.git
synced 2026-11-07 04:25:58 -10:00
A place to put updates and DLC
Neither is content a frontend can hand over: an update mounts over the base title's /vol/content and a DLC mounts as /vol/aoc, and both are picked out of the title list by title id rather than by the path that was loaded. The core scans mlc01 already, but it had no game path at all, so the only way to get an update in front of it was to build the mlc01 layout by hand. There is now a directory for it - Cemu/titles in the frontend's system directory - added as a scan path. That is the same scan Cemu's own game paths get, which takes an update in the raw NUS form it is downloaded in (.app and .h3 next to title.tmd and title.tik) as well as an unpacked code/content/meta folder, and descends into subdirectories, so a folder per update or DLC works. Nothing is copied: a title update is several gigabytes, and writing it twice to install it is a cost with nothing behind it.
This commit is contained in:
1 parent
51ea3934cb
commit
5837c4eb6c
1 file changed
+23
@@ -2522,6 +2522,29 @@ RETRO_API void retro_init()
|
||||
GetConfig().SetMLCPath(s_mlc_path, false);
|
||||
cemuLog_log(LogType::Force, "mlc01: {}", _pathToUtf8(ActiveSettings::GetMlcPath()));
|
||||
|
||||
// Where updates and DLC go. Neither is content the frontend can hand over:
|
||||
// an update mounts over the base title's /vol/content and a DLC mounts as
|
||||
// /vol/aoc, and both are chosen by title id out of the title list rather
|
||||
// than by the path that was loaded. So the only thing a core without a file
|
||||
// browser is missing is a place to put them, and this is it - scanned like
|
||||
// any of Cemu's own game paths, which means it takes an update in the raw
|
||||
// NUS form it is downloaded in (.app and .h3 files next to title.tmd and
|
||||
// title.tik) as well as an unpacked code/content/meta folder, and it
|
||||
// descends into subdirectories, so one folder per update or DLC is fine.
|
||||
//
|
||||
// Nothing is copied anywhere: the files stay where the user put them, which
|
||||
// for a title update is several gigabytes not written twice.
|
||||
{
|
||||
std::error_code ec;
|
||||
const fs::path extraTitles = ActiveSettings::GetUserDataPath("titles");
|
||||
fs::create_directories(extraTitles, ec);
|
||||
const std::string extraTitlesUtf8 = _pathToUtf8(extraTitles);
|
||||
auto& gamePaths = GetConfig().game_paths;
|
||||
if (std::find(gamePaths.begin(), gamePaths.end(), extraTitlesUtf8) == gamePaths.end())
|
||||
gamePaths.emplace_back(extraTitlesUtf8);
|
||||
cemuLog_log(LogType::Force, "updates and DLC: {}", extraTitlesUtf8);
|
||||
}
|
||||
|
||||
libretro_log(RETRO_LOG_INFO, "retro_init: choosing the graphics API\n");
|
||||
|
||||
// Select graphics API based on core option
|
||||
|
||||
Reference in new issue
Block a user