mirror of
https://github.com/J-D-K/JKSV.git
synced 2026-04-25 16:15:11 -05:00
Implement Delete All Save Backups option for TitleOptions
This commit is contained in:
parent
b37413a51c
commit
ea8c653649
|
|
@ -147,6 +147,7 @@
|
|||
],
|
||||
"TitleOptionConfirmations": [
|
||||
"Are you sure you want to add #%s# to you blacklist? Once you do this, it will no longer appear on any title list or selection.",
|
||||
"Are you sure you would like to delete all of the current save backups for #%s#? This cannot be undone!",
|
||||
"Are you sure you want to delete #%s#'s save data for #%s#? This will permanently delete it from the system."
|
||||
],
|
||||
"PopMessagesGeneral": [
|
||||
|
|
|
|||
|
|
@ -120,6 +120,23 @@ void TitleOptionState::update(void)
|
|||
|
||||
case DELETE_ALL_BACKUPS:
|
||||
{
|
||||
// String
|
||||
std::string confirmString = stringutil::get_formatted_string(
|
||||
strings::get_by_name(strings::names::TITLE_OPTION_CONFIRMATIONS, 1),
|
||||
m_titleInfo->get_title());
|
||||
|
||||
// Data
|
||||
std::shared_ptr<TargetStruct> data = std::make_shared<TargetStruct>();
|
||||
data->m_targetTitle = m_titleInfo;
|
||||
|
||||
// State. This always requires holding because I hate people complaining to me about how it's my fault they don't read things first.
|
||||
std::shared_ptr<ConfirmState<sys::Task, TaskState, TargetStruct>> confirm =
|
||||
std::make_shared<ConfirmState<sys::Task, TaskState, TargetStruct>>(confirmString,
|
||||
true,
|
||||
delete_all_backups_for_title,
|
||||
data);
|
||||
|
||||
JKSV::push_state(confirm);
|
||||
}
|
||||
break;
|
||||
|
||||
|
|
|
|||
|
|
@ -255,7 +255,7 @@ static void load_save_data_info(void)
|
|||
{
|
||||
continue;
|
||||
}
|
||||
// If it made it here, we need to close the file system before we forget.
|
||||
// If it made it here, we need to close the file system before we, I mean I forget.
|
||||
fslib::close_file_system(fs::DEFAULT_SAVE_MOUNT);
|
||||
|
||||
// JKSV uses fake placeholder accounts for system type saves.
|
||||
|
|
@ -328,6 +328,7 @@ static void load_save_data_info(void)
|
|||
|
||||
// I feel weird allcating space for this even if it's not used, but whatever.
|
||||
PdmPlayStatistics stats = {0};
|
||||
|
||||
// This should be an OKish way to filter out system titles...
|
||||
if (titleInfo.has_control_data() &&
|
||||
R_FAILED(
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user