mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-11-27 08:13:34 +01:00
More GameManager improvements.
This commit is contained in:
1 parent
aca0f35bdf
commit
66c3f31ff9
4 files changed
+31
-19
No files matched your search
+8
-5
@@ -284,13 +284,16 @@ void ProductView::Update() {
|
||||
}
|
||||
|
||||
UI::EventReturn ProductView::OnInstall(UI::EventParams &e) {
|
||||
std::string zipUrl;
|
||||
std::string fileUrl;
|
||||
if (entry_.downloadURL.empty()) {
|
||||
// Construct the URL, easy to predict from our server
|
||||
zipUrl = storeBaseUrl + "files/" + entry_.file + ".zip";
|
||||
std::string shortName = entry_.file;
|
||||
if (shortName.find('.') == std::string::npos)
|
||||
shortName += ".zip";
|
||||
fileUrl = storeBaseUrl + "files/" + shortName;
|
||||
} else {
|
||||
// Use the provided URL, for external hosting.
|
||||
zipUrl = entry_.downloadURL;
|
||||
fileUrl = entry_.downloadURL;
|
||||
}
|
||||
if (installButton_) {
|
||||
installButton_->SetEnabled(false);
|
||||
@@ -298,8 +301,8 @@ UI::EventReturn ProductView::OnInstall(UI::EventParams &e) {
|
||||
if (cancelButton_) {
|
||||
cancelButton_->SetVisibility(UI::V_VISIBLE);
|
||||
}
|
||||
INFO_LOG(SYSTEM, "Triggering install of %s", zipUrl.c_str());
|
||||
g_GameManager.DownloadAndInstall(zipUrl);
|
||||
INFO_LOG(SYSTEM, "Triggering install of '%s'", fileUrl.c_str());
|
||||
g_GameManager.DownloadAndInstall(fileUrl);
|
||||
return UI::EVENT_DONE;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user