[XAM] Added option to remove titles with 0 achievements unlocked
This commit is contained in:
committed by
Radosław Gliński
parent
4e8e789876
commit
70364e73ae
@@ -112,18 +112,6 @@ void TitleListUI::DrawTitleEntry(ImGuiIO& io, TitleInfo& entry) {
|
||||
if (ImGui::BeginPopupContextItem(
|
||||
fmt::format("Title Menu {:08X}", entry.id).c_str())) {
|
||||
selected_title_ = entry.id;
|
||||
if (ImGui::MenuItem("Refresh title stats", nullptr, nullptr, true)) {
|
||||
kernel_state()->xam_state()->user_tracker()->RefreshTitleSummary(
|
||||
profile_->xuid(), entry.id);
|
||||
|
||||
const auto title_info =
|
||||
kernel_state()->xam_state()->user_tracker()->GetUserTitleInfo(
|
||||
profile_->xuid(), entry.id);
|
||||
|
||||
if (title_info) {
|
||||
entry = title_info.value();
|
||||
}
|
||||
}
|
||||
|
||||
const auto savefile_path = profile_manager_->GetProfileContentPath(
|
||||
profile_->xuid(), entry.id, XContentType::kSavedGame);
|
||||
@@ -150,6 +138,29 @@ void TitleListUI::DrawTitleEntry(ImGuiIO& io, TitleInfo& entry) {
|
||||
path_open.detach();
|
||||
}
|
||||
|
||||
ImGui::Separator();
|
||||
|
||||
const auto title_info =
|
||||
kernel_state()->xam_state()->user_tracker()->GetUserTitleInfo(
|
||||
profile_->xuid(), entry.id);
|
||||
|
||||
if (ImGui::MenuItem("Refresh title stats", nullptr, nullptr, true)) {
|
||||
kernel_state()->xam_state()->user_tracker()->RefreshTitleSummary(
|
||||
profile_->xuid(), entry.id);
|
||||
|
||||
if (title_info) {
|
||||
entry = title_info.value();
|
||||
}
|
||||
}
|
||||
|
||||
if (title_info) {
|
||||
if (ImGui::MenuItem("Delete title", nullptr, nullptr,
|
||||
!title_info->unlocked_achievements_count)) {
|
||||
kernel_state()->xam_state()->user_tracker()->RemoveTitleFromPlayedList(
|
||||
profile_->xuid(), entry.id);
|
||||
}
|
||||
}
|
||||
|
||||
ImGui::EndPopup();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user