Skip to content

Commit

Permalink
Remove legacy patch installation method
Browse files Browse the repository at this point in the history
  • Loading branch information
cuevavirus committed May 2, 2020
1 parent 4601db9 commit 6e7d16c
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 52 deletions.
50 changes: 0 additions & 50 deletions src/gameview.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down Expand Up @@ -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<uint8_t>{},
// TODO sha1 check
std::vector<uint8_t>{},
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;
Expand Down
2 changes: 0 additions & 2 deletions src/gameview.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
};

0 comments on commit 6e7d16c

Please sign in to comment.