Compare commits

..

1 Commits

4 changed files with 18 additions and 28 deletions
+2 -2
View File
@@ -858,7 +858,7 @@ struct Values {
SwitchableSetting<std::string> program_args{linkage,
std::string(),
"program_args",
Category::Debugging,
Category::System,
Specialization::Default,
true, // save_ - persist in config file
false}; // runtime_modifiable_ - startup-only
@@ -904,7 +904,7 @@ struct Values {
0,
65535,
"debug_knobs",
Category::Debugging,
Category::System,
Specialization::Countable,
true,
true};
+1 -5
View File
@@ -57,11 +57,7 @@ std::string GetFutureSaveDataPath(SaveDataSpaceId space_id, SaveDataType type, u
SaveDataFactory::SaveDataFactory(Core::System& system_, ProgramId program_id_,
VirtualDir save_directory_)
: system{system_}, program_id{program_id_}, dir{std::move(save_directory_)} {
// Delete all temporary storages
// On hardware, it is expected that temporary storage be empty at first use.
dir->DeleteSubdirectoryRecursive("temp");
}
: system{system_}, program_id{program_id_}, dir{std::move(save_directory_)} {}
SaveDataFactory::~SaveDataFactory() = default;
@@ -336,6 +336,10 @@ Result FileSystemController::RegisterProcess(
ProcessId process_id, ProgramId program_id,
std::shared_ptr<FileSys::RomFSFactory>&& romfs_factory) {
std::scoped_lock lk{registration_lock};
if (registrations.empty()) {
const auto save_directory = system.GetFilesystem()->OpenDirectory(Common::FS::GetEdenPathString(Common::FS::EdenPath::SaveDir), FileSys::OpenMode::ReadWrite);
if (save_directory != nullptr) save_directory->DeleteSubdirectoryRecursive("temp");
}
registrations.emplace(process_id, Registration{
.program_id = program_id,
+11 -21
View File
@@ -299,17 +299,12 @@ void Config::ReadDataStorageValues() {
void Config::ReadDebuggingValues() {
BeginGroup(Settings::TranslateCategory(Settings::Category::Debugging));
if (global) {
// Intentionally not using the QT default setting as this is intended to be changed in the ini
Settings::values.record_frame_times =
ReadBooleanSetting(std::string("record_frame_times"), std::make_optional(false));
// Intentionally not using the QT default setting as this is intended to be changed in the ini
Settings::values.record_frame_times =
ReadBooleanSetting(std::string("record_frame_times"), std::make_optional(false));
ReadCategory(Settings::Category::Debugging);
ReadCategory(Settings::Category::DebuggingGraphics);
} else {
ReadSettingGeneric(&Settings::values.program_args);
ReadSettingGeneric(&Settings::values.debug_knobs);
}
ReadCategory(Settings::Category::Debugging);
ReadCategory(Settings::Category::DebuggingGraphics);
EndGroup();
}
@@ -420,12 +415,12 @@ void Config::ReadLibraryAppletValues() {
void Config::ReadValues() {
if (global) {
ReadDataStorageValues();
ReadDebuggingValues();
ReadDisabledAddOnValues();
ReadServiceValues();
ReadWebServiceValues();
ReadMiscellaneousValues();
}
ReadDebuggingValues();
ReadLibraryAppletValues();
ReadNetworkValues();
ReadControlValues();
@@ -516,13 +511,13 @@ void Config::SaveValues() {
if (global) {
LOG_DEBUG(Config, "Saving global generic configuration values");
SaveDataStorageValues();
SaveDebuggingValues();
SaveDisabledAddOnValues();
SaveWebServiceValues();
SaveMiscellaneousValues();
} else {
LOG_DEBUG(Config, "Saving only generic configuration values");
}
SaveDebuggingValues();
SaveLibraryAppletValues();
SaveNetworkValues();
SaveControlValues();
@@ -605,16 +600,11 @@ void Config::SaveDataStorageValues() {
void Config::SaveDebuggingValues() {
BeginGroup(Settings::TranslateCategory(Settings::Category::Debugging));
if (global) {
// Intentionally not using the QT default setting as this is intended to be changed in the ini
WriteBooleanSetting(std::string("record_frame_times"), Settings::values.record_frame_times);
// Intentionally not using the QT default setting as this is intended to be changed in the ini
WriteBooleanSetting(std::string("record_frame_times"), Settings::values.record_frame_times);
WriteCategory(Settings::Category::Debugging);
WriteCategory(Settings::Category::DebuggingGraphics);
} else {
WriteSettingGeneric(&Settings::values.program_args);
WriteSettingGeneric(&Settings::values.debug_knobs);
}
WriteCategory(Settings::Category::Debugging);
WriteCategory(Settings::Category::DebuggingGraphics);
EndGroup();
}