mirror of
https://github.com/J-D-K/JKSV.git
synced 2026-03-21 17:24:37 -05:00
Update useroptions and mainmenu tasks. Fixes #307.
This commit is contained in:
parent
1f29f954b5
commit
15d7063871
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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; }
|
||||
|
|
|
|||
|
|
@ -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; }
|
||||
|
|
|
|||
|
|
@ -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); }
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user