From 48db42b6be8c0f84c8d8abb02fa8c140c4de6f5f Mon Sep 17 00:00:00 2001 From: Henrik Rydgard Date: Thu, 1 Oct 2015 12:37:16 +0200 Subject: [PATCH] Respect "hidden" flag in the homebrew store. Useful when managing it. (For example, I just hid "Lamecraft" because it didn't actually work). --- UI/Store.cpp | 4 +++- UI/Store.h | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/UI/Store.cpp b/UI/Store.cpp index b0d6519a1e..8a974dd4c4 100644 --- a/UI/Store.cpp +++ b/UI/Store.cpp @@ -359,6 +359,7 @@ void StoreScreen::ParseListing(std::string json) { e.size = game->getInt("size"); e.downloadURL = game->getString("download-url", ""); e.iconURL = game->getString("icon-url", ""); + e.hidden = game->getBool("hidden", false); const char *file = game->getString("file", 0); if (!file) continue; @@ -413,7 +414,8 @@ std::vector StoreScreen::FilterEntries() { std::vector filtered; for (size_t i = 0; i < entries_.size(); i++) { // TODO: Actually filter by category etc. - filtered.push_back(entries_[i]); + if (!entries_[i].hidden) + filtered.push_back(entries_[i]); } return filtered; } diff --git a/UI/Store.h b/UI/Store.h index ff7ba04e7a..fc1c35edfb 100644 --- a/UI/Store.h +++ b/UI/Store.h @@ -49,6 +49,7 @@ struct StoreEntry { std::string file; // This is the folder name of the installed one too, and hence a "unique-ish" identifier. std::string category; std::string downloadURL; // Only set for games that are not hosted on store.ppsspp.org + bool hidden; u64 size; };