Update useroptions and mainmenu tasks. Fixes #307.

This commit is contained in:
J-D-K 2025-10-03 10:41:22 -04:00
parent 1f29f954b5
commit 15d7063871
4 changed files with 8 additions and 3 deletions

View File

@ -66,7 +66,7 @@ namespace ui
void update_y(double targetY) noexcept;
/// @brief Updates the current end offset of the text.
void update_text_offset() noexcept;
void update_text_offset();
/// @brief Updates the width of the dialog.
void update_width() noexcept;

View File

@ -40,6 +40,7 @@ void tasks::mainmenu::backup_all_for_all_local(sys::threadpool::JobData taskData
if (!scopedMount.is_open() || !fs::directory_has_contents(fs::DEFAULT_SAVE_ROOT)) { continue; }
}
backupStruct->saveInfo = saveInfo;
const uint64_t applicationID = saveInfo->application_id;
data::TitleInfo *titleInfo = data::get_title_info_by_id(applicationID);
if (error::is_null(titleInfo)) { continue; }
@ -96,6 +97,7 @@ void tasks::mainmenu::backup_all_for_all_remote(sys::threadpool::JobData taskDat
const FsSaveDataInfo *saveInfo = user->get_save_info_at(i);
if (error::is_null(saveInfo)) { continue; }
backupStruct->saveInfo = saveInfo;
{
fs::ScopedSaveMount scopedMount{fs::DEFAULT_SAVE_MOUNT, saveInfo};
if (!scopedMount.is_open() || !fs::directory_has_contents(fs::DEFAULT_SAVE_ROOT)) { continue; }

View File

@ -32,6 +32,7 @@ void tasks::useroptions::backup_all_for_user_local(sys::threadpool::JobData task
const FsSaveDataInfo *saveInfo = user->get_save_info_at(i);
if (error::is_null(saveInfo)) { continue; }
backupStruct->saveInfo = saveInfo;
{
fs::ScopedSaveMount scopedMount{fs::DEFAULT_SAVE_MOUNT, saveInfo};
if (!scopedMount.is_open() || !fs::directory_has_contents(fs::DEFAULT_SAVE_ROOT)) { continue; }
@ -39,8 +40,8 @@ void tasks::useroptions::backup_all_for_user_local(sys::threadpool::JobData task
data::TitleInfo *titleInfo = data::get_title_info_by_id(saveInfo->application_id);
if (error::is_null(titleInfo)) { continue; }
backupStruct->titleInfo = titleInfo;
backupStruct->titleInfo = titleInfo;
const fslib::Path targetDir{workDir / titleInfo->get_path_safe_title()};
const bool targetExists = fslib::directory_exists(targetDir);
const bool createError = !targetExists && error::fslib(fslib::create_directories_recursively(targetDir));
@ -84,6 +85,7 @@ void tasks::useroptions::backup_all_for_user_remote(sys::threadpool::JobData tas
const FsSaveDataInfo *saveInfo = user->get_save_info_at(i);
if (error::is_null(saveInfo)) { continue; }
backupStruct->saveInfo = saveInfo;
{
fs::ScopedSaveMount scopedMount{fs::DEFAULT_SAVE_MOUNT, saveInfo};
if (!scopedMount.is_open() || !fs::directory_has_contents(fs::DEFAULT_SAVE_ROOT)) { continue; }

View File

@ -65,7 +65,7 @@ void ui::PopMessage::update_y(double targetY) noexcept
m_dialog->set_y(y - 6);
}
void ui::PopMessage::update_text_offset() noexcept
void ui::PopMessage::update_text_offset()
{
static constexpr int HALF_WIDTH = 640;
@ -89,6 +89,7 @@ void ui::PopMessage::update_text_offset() noexcept
m_transition.set_target_x(dialogX);
m_transition.set_target_width(dialogWidth);
if (m_substrOffset >= messageLength) { m_displayTimer.start(m_ticks); }
}