Homebrew Store: Add support for cancelling downloads, fix progress bar. Fixes #9374

This commit is contained in:
Henrik Rydgård committed 2017-03-06 16:03:05 +01:00
1 parent 56e0d5ece2
commit 85c8d9b806
10 files changed
+82 -27

No files matched your search

+4 -4
View File
@@ -61,8 +61,8 @@ void InstallZipScreen::CreateViews() {
}
bool InstallZipScreen::key(const KeyInput &key) {
// Ignore all key presses during installation to avoid user escape
if (!g_GameManager.IsInstallInProgress()) {
// Ignore all key presses during download and installation to avoid user escape
if (g_GameManager.GetState() == GameManagerState::IDLE) {
return UIScreen::key(key);
}
return false;
@@ -80,9 +80,9 @@ void InstallZipScreen::update(InputState &input) {
I18NCategory *iz = GetI18NCategory("InstallZip");
using namespace UI;
if (g_GameManager.IsInstallInProgress()) {
if (g_GameManager.GetState() != GameManagerState::IDLE) {
progressBar_->SetVisibility(V_VISIBLE);
progressBar_->SetProgress(g_GameManager.GetCurrentInstallProgress());
progressBar_->SetProgress(g_GameManager.GetCurrentInstallProgressPercentage());
backChoice_->SetEnabled(false);
} else {
progressBar_->SetVisibility(V_GONE);