mirror of
https://gitlab.com/Theopse/fbi-i18n-zh.git
synced 2025-05-06 08:16:35 +08:00
Limit cartridge titles to supported options.
This commit is contained in:
parent
0a3542d565
commit
62eac326db
@ -27,6 +27,14 @@ static list_item titles_action_items[TITLES_ACTION_COUNT] = {
|
|||||||
{"Export Secure Value", 0xFF000000, action_export_secure_value},
|
{"Export Secure Value", 0xFF000000, action_export_secure_value},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#define CARD_TITLES_ACTION_COUNT 2
|
||||||
|
|
||||||
|
static u32 card_titles_action_count = CARD_TITLES_ACTION_COUNT;
|
||||||
|
static list_item card_titles_action_items[CARD_TITLES_ACTION_COUNT] = {
|
||||||
|
{"Launch Title", 0xFF000000, action_launch_title},
|
||||||
|
{"Browse Save Data", 0xFF000000, action_browse_title_save_data},
|
||||||
|
};
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
title_info* info;
|
title_info* info;
|
||||||
bool* populated;
|
bool* populated;
|
||||||
@ -61,11 +69,18 @@ static void titles_action_update(ui_view* view, void* data, list_item** items, u
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(actionData->info->mediaType == MEDIATYPE_GAME_CARD) {
|
||||||
|
if(*itemCount != &card_titles_action_count || *items != card_titles_action_items) {
|
||||||
|
*itemCount = &card_titles_action_count;
|
||||||
|
*items = card_titles_action_items;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
if(*itemCount != &titles_action_count || *items != titles_action_items) {
|
if(*itemCount != &titles_action_count || *items != titles_action_items) {
|
||||||
*itemCount = &titles_action_count;
|
*itemCount = &titles_action_count;
|
||||||
*items = titles_action_items;
|
*items = titles_action_items;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
static ui_view* titles_action_create(title_info* info, bool* populated) {
|
static ui_view* titles_action_create(title_info* info, bool* populated) {
|
||||||
titles_action_data* data = (titles_action_data*) calloc(1, sizeof(titles_action_data));
|
titles_action_data* data = (titles_action_data*) calloc(1, sizeof(titles_action_data));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user