From 26990b3be99b16040bc9ed1a1a371ecd7616b60e Mon Sep 17 00:00:00 2001 From: Alula Date: Tue, 17 Mar 2026 12:15:03 +0100 Subject: [PATCH] fs: DisableAutoSaveDataCreation was removed in 22 --- .../stratosphere/fssrv/sf/fssrv_sf_i_file_system_proxy.hpp | 2 +- libraries/libstratosphere/source/erpt/srv/erpt_srv_main.cpp | 4 +++- .../libstratosphere/source/fs/fs_save_data_management.cpp | 4 ++++ 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/libraries/libstratosphere/include/stratosphere/fssrv/sf/fssrv_sf_i_file_system_proxy.hpp b/libraries/libstratosphere/include/stratosphere/fssrv/sf/fssrv_sf_i_file_system_proxy.hpp index 5ccee0cdf..44b54ff12 100644 --- a/libraries/libstratosphere/include/stratosphere/fssrv/sf/fssrv_sf_i_file_system_proxy.hpp +++ b/libraries/libstratosphere/include/stratosphere/fssrv/sf/fssrv_sf_i_file_system_proxy.hpp @@ -132,7 +132,7 @@ AMS_SF_METHOD_INFO(C, H, 1000, Result, SetBisRootForHost, (u32 id, const fssrv::sf::FspPath &path), (id, path), hos::Version_Min, hos::Version_9_2_0) \ AMS_SF_METHOD_INFO(C, H, 1001, Result, SetSaveDataSize, (s64 size, s64 journal_size), (size, journal_size)) \ AMS_SF_METHOD_INFO(C, H, 1002, Result, SetSaveDataRootPath, (const fssrv::sf::FspPath &path), (path)) \ - AMS_SF_METHOD_INFO(C, H, 1003, Result, DisableAutoSaveDataCreation, (), ()) \ + AMS_SF_METHOD_INFO(C, H, 1003, Result, DisableAutoSaveDataCreation, (), (), hos::Version_Min, hos::Version_21_2_0) \ AMS_SF_METHOD_INFO(C, H, 1004, Result, SetGlobalAccessLogMode, (u32 mode), (mode)) \ AMS_SF_METHOD_INFO(C, H, 1005, Result, GetGlobalAccessLogMode, (ams::sf::Out out), (out)) \ AMS_SF_METHOD_INFO(C, H, 1006, Result, OutputAccessLogToSdCard, (const ams::sf::InBuffer &buf), (buf)) \ diff --git a/libraries/libstratosphere/source/erpt/srv/erpt_srv_main.cpp b/libraries/libstratosphere/source/erpt/srv/erpt_srv_main.cpp index 8447fbb4c..2f853900d 100644 --- a/libraries/libstratosphere/source/erpt/srv/erpt_srv_main.cpp +++ b/libraries/libstratosphere/source/erpt/srv/erpt_srv_main.cpp @@ -53,7 +53,9 @@ namespace ams::erpt::srv { } Result MountSystemSaveData() { - fs::DisableAutoSaveDataCreation(); + if (hos::GetVersion() < hos::Version_22_0_0) { + fs::DisableAutoSaveDataCreation(); + } /* Extend the system save data. */ /* NOTE: Nintendo used to not check the result of this; they do now, but . */ diff --git a/libraries/libstratosphere/source/fs/fs_save_data_management.cpp b/libraries/libstratosphere/source/fs/fs_save_data_management.cpp index 0e9bdeb1a..5bca5e787 100644 --- a/libraries/libstratosphere/source/fs/fs_save_data_management.cpp +++ b/libraries/libstratosphere/source/fs/fs_save_data_management.cpp @@ -42,6 +42,10 @@ namespace ams::fs { } void DisableAutoSaveDataCreation() { + if (hos::GetVersion() >= hos::Version_22_0_0) { + return; + } + auto fsp = impl::GetFileSystemProxyServiceObject(); AMS_FS_R_ABORT_UNLESS(fsp->DisableAutoSaveDataCreation()); }