From 6e7d16c87a29f1fc924f619179594010932a6372 Mon Sep 17 00:00:00 2001 From: cuevavirus <53134627+cuevavirus@users.noreply.github.com> Date: Sat, 2 May 2020 15:49:08 -0400 Subject: [PATCH] Remove legacy patch installation method --- src/gameview.cpp | 50 ------------------------------------------------ src/gameview.hpp | 2 -- 2 files changed, 52 deletions(-) diff --git a/src/gameview.cpp b/src/gameview.cpp index f3066f59..a0539a60 100644 --- a/src/gameview.cpp +++ b/src/gameview.cpp @@ -104,37 +104,6 @@ void GameView::render() start_download_package(); } - switch (_patch_info_fetcher.get_status()) - { - case PatchInfoFetcher::Status::Fetching: - ImGui::Button("Checking for patch...###installpatch"); - break; - case PatchInfoFetcher::Status::NoUpdate: - ImGui::Button("No patch found###installpatch"); - break; - case PatchInfoFetcher::Status::Found: - { - const auto patch_info = _patch_info_fetcher.get_patch_info(); - if (!_downloader->is_in_queue(Patch, _item->titleid)) - { - if (ImGui::Button(fmt::format( - "Install patch {}###installpatch", - patch_info->version) - .c_str())) - start_download_patch(*patch_info); - } - else - { - if (ImGui::Button("Cancel patch installation###installpatch")) - cancel_download_patch(); - } - break; - } - case PatchInfoFetcher::Status::Error: - ImGui::Button("Failed to fetch patch information###installpatch"); - break; - } - if (_base_comppack) { if (!_downloader->is_in_queue(CompPackBase, _item->titleid)) @@ -310,25 +279,6 @@ void GameView::cancel_download_package() _item->presence = PresenceUnknown; } -void GameView::start_download_patch(const PatchInfo& patch_info) -{ - _downloader->add(DownloadItem{Patch, - _item->name, - _item->titleid, - patch_info.url, - std::vector{}, - // TODO sha1 check - std::vector{}, - false, - "ux0:", - ""}); -} - -void GameView::cancel_download_patch() -{ - _downloader->remove_from_queue(Patch, _item->titleid); -} - void GameView::start_download_comppack(bool patch) { const auto& entry = patch ? _patch_comppack : _base_comppack; diff --git a/src/gameview.hpp b/src/gameview.hpp index 8d8fed42..1998ddb9 100644 --- a/src/gameview.hpp +++ b/src/gameview.hpp @@ -60,8 +60,6 @@ class GameView void printDiagnostic(); void start_download_package(); void cancel_download_package(); - void start_download_patch(const PatchInfo& patch_info); - void cancel_download_patch(); void start_download_comppack(bool patch); void cancel_download_comppacks(bool patch); };