mirror of
https://github.com/hrydgard/ppsspp.git
synced 2024-11-23 05:19:56 +00:00
Add support for a "content rating" field for apps in the homebrew store.
This is to maximize likelihood of passing iOS review.
This commit is contained in:
parent
a5526d3b65
commit
a75516f53e
@ -456,7 +456,7 @@ void StoreScreen::ParseListing(const std::string &json) {
|
||||
entries_.clear();
|
||||
for (const JsonNode *pgame : entries->value) {
|
||||
JsonGet game = pgame->value;
|
||||
StoreEntry e;
|
||||
StoreEntry e{};
|
||||
e.type = ENTRY_PBPZIP;
|
||||
e.name = GetTranslatedString(game, "name");
|
||||
e.description = GetTranslatedString(game, "description", "");
|
||||
@ -464,6 +464,12 @@ void StoreScreen::ParseListing(const std::string &json) {
|
||||
e.size = game.getInt("size");
|
||||
e.downloadURL = game.getStringOr("download-url", "");
|
||||
e.iconURL = game.getStringOr("icon-url", "");
|
||||
e.contentRating = game.getInt("content-rating", 0);
|
||||
#if PPSSPP_PLATFORM(IOS_APP_STORE)
|
||||
if (e.contentRating >= 100) {
|
||||
continue;
|
||||
}
|
||||
#endif
|
||||
e.hidden = false; // NOTE: Handling of the "hidden" flag is broken in old versions of PPSSPP. Do not use.
|
||||
const char *file = game.getStringOr("file", nullptr);
|
||||
if (!file)
|
||||
|
@ -54,6 +54,7 @@ struct StoreEntry {
|
||||
std::string category;
|
||||
std::string downloadURL; // Only set for games that are not hosted on store.ppsspp.org
|
||||
bool hidden;
|
||||
int contentRating; // 100 means to hide it on iOS. No other values defined yet.
|
||||
u64 size;
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user