diff --git a/src/skate3_app_common.cpp b/src/skate3_app_common.cpp index 3a59583..d4300bc 100644 --- a/src/skate3_app_common.cpp +++ b/src/skate3_app_common.cpp @@ -213,6 +213,7 @@ void SetRestartArgument(std::vector& args, std::string name, std::s constexpr std::string_view kUserDirectoryName = "skate3"; constexpr std::string_view kSettingsFilename = "settings.toml"; constexpr std::string_view kDlcDirectoryName = "dlc"; +constexpr std::string_view kSavesDirectoryName = "saves"; constexpr double kSixteenNineAspect = 16.0 / 9.0; constexpr double kUltrawideAspectEpsilon = 0.01; @@ -807,6 +808,20 @@ void Skate3BaseApp::OnPostSetup() { if (std::getenv("SKATE3_DISABLE_BIG_ALIASES") == nullptr) { InstallBigDeviceAliases(); } + // Portable saves: a "saves" folder next to the executable takes over + // saved-game content when it exists (launcher-managed installs). Layout is + // flattened to saves//; nothing is migrated from the user + // content tree, and without the folder the default location is unchanged. + { + const auto portable_saves = + rex::filesystem::GetExecutableFolder() / std::string(kSavesDirectoryName); + if (std::filesystem::is_directory(portable_saves) && runtime()->kernel_state() && + runtime()->kernel_state()->content_manager()) { + runtime()->kernel_state()->content_manager()->SetContentTypeRoot( + rex::system::XContentType::kSavedGame, portable_saves); + REXLOG_INFO("Skate 3 saves: using portable folder {}", portable_saves.string()); + } + } InstallDlcPackages(); InstallRecipeOverlay(); diff --git a/third_party/rexglue-sdk b/third_party/rexglue-sdk index 9181630..8130e53 160000 --- a/third_party/rexglue-sdk +++ b/third_party/rexglue-sdk @@ -1 +1 @@ -Subproject commit 9181630ecec1b34d70a110e903df6d522e0e6cd2 +Subproject commit 8130e534bca688b5992b67e5c551e2be763a7b34