mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
Fix bug in homebrew store with files with "." in their names.
Also, move the homebrew store button to the top bar instead of the bottom of the list.
This commit is contained in:
parent
eb0f0d39ba
commit
bd15ae4f75
4 changed files with 8 additions and 19 deletions
|
@ -256,6 +256,7 @@ void GPU_Vulkan::CheckGPUFeatures() {
|
|||
features |= GPU_SUPPORTS_ANISOTROPY;
|
||||
}
|
||||
|
||||
// These are VULKAN_4444_FORMAT and friends.
|
||||
uint32_t fmt4444 = draw_->GetDataFormatSupport(Draw::DataFormat::B4G4R4A4_UNORM_PACK16);
|
||||
uint32_t fmt1555 = draw_->GetDataFormatSupport(Draw::DataFormat::A1R5G5B5_UNORM_PACK16);
|
||||
|
||||
|
|
|
@ -669,6 +669,11 @@ void GameBrowser::Refresh() {
|
|||
} else {
|
||||
topBar->Add(new Spacer(new LinearLayoutParams(FILL_PARENT, 64.0f, 1.0f)));
|
||||
}
|
||||
|
||||
if (browseFlags_ & BrowseFlags::HOMEBREW_STORE) {
|
||||
topBar->Add(new Choice(mm->T("PPSSPP Homebrew Store"), new UI::LinearLayoutParams(WRAP_CONTENT, 64.0f)))->OnClick.Handle(this, &GameBrowser::OnHomebrewStore);
|
||||
}
|
||||
|
||||
ChoiceStrip *layoutChoice = topBar->Add(new ChoiceStrip(ORIENT_HORIZONTAL));
|
||||
layoutChoice->AddChoice(ImageID("I_GRID"));
|
||||
layoutChoice->AddChoice(ImageID("I_LINES"));
|
||||
|
@ -806,11 +811,6 @@ void GameBrowser::Refresh() {
|
|||
OnClick.Handle(this, &GameBrowser::PinToggleClick);
|
||||
}
|
||||
|
||||
if (browseFlags_ & BrowseFlags::HOMEBREW_STORE) {
|
||||
Add(new Spacer());
|
||||
Add(new Choice(mm->T("DownloadFromStore", "Download from the PPSSPP Homebrew Store"), new UI::LinearLayoutParams(UI::WRAP_CONTENT, UI::WRAP_CONTENT)))->OnClick.Handle(this, &GameBrowser::OnHomebrewStore);
|
||||
}
|
||||
|
||||
if (!lastText_.empty() && gameButtons.empty()) {
|
||||
Add(new Spacer());
|
||||
Add(new Choice(lastText_, new UI::LinearLayoutParams(UI::WRAP_CONTENT, UI::WRAP_CONTENT)))->OnClick.Handle(this, &GameBrowser::LastClick);
|
||||
|
|
15
UI/Store.cpp
15
UI/Store.cpp
|
@ -304,11 +304,8 @@ void ProductView::Update() {
|
|||
|
||||
std::string ProductView::DownloadURL() {
|
||||
if (entry_.downloadURL.empty()) {
|
||||
// Construct the URL, easy to predict from our server
|
||||
std::string shortName = entry_.file;
|
||||
if (shortName.find('.') == std::string::npos)
|
||||
shortName += ".zip";
|
||||
return storeBaseUrl + "files/" + shortName;
|
||||
// Construct the URL.
|
||||
return storeBaseUrl + "files/" + entry_.file + ".zip";
|
||||
} else {
|
||||
// Use the provided URL, for external hosting.
|
||||
return entry_.downloadURL;
|
||||
|
@ -559,14 +556,6 @@ UI::EventReturn StoreScreen::OnRetry(UI::EventParams &e) {
|
|||
return UI::EVENT_DONE;
|
||||
}
|
||||
|
||||
std::string StoreScreen::GetStoreJsonURL(std::string storePath) const {
|
||||
std::string path = storeBaseUrl + storePath;
|
||||
if (*path.rbegin() != '/')
|
||||
path += '/';
|
||||
path += "index.json";
|
||||
return path;
|
||||
}
|
||||
|
||||
std::string StoreScreen::GetTranslatedString(const json::JsonGet json, std::string key, const char *fallback) const {
|
||||
json::JsonGet dict = json.getDict("en_US");
|
||||
if (dict && json.hasChild(lang_.c_str(), JSON_OBJECT)) {
|
||||
|
|
|
@ -81,7 +81,6 @@ private:
|
|||
ProductItemView *GetSelectedItem();
|
||||
std::vector<StoreEntry> FilterEntries();
|
||||
|
||||
std::string GetStoreJsonURL(std::string storePath) const;
|
||||
std::string GetTranslatedString(const json::JsonGet json, std::string key, const char *fallback = nullptr) const;
|
||||
|
||||
std::shared_ptr<http::Download> listing_;
|
||||
|
|
Loading…
Add table
Reference in a new issue