Turn menu_dialog_current_id into static variable again

This commit is contained in:
twinaphex 2016-11-06 11:55:07 +01:00
parent 05f1657048
commit 0a046eaaf7
3 changed files with 9 additions and 2 deletions

View File

@ -1506,7 +1506,7 @@ static int action_ok_cheevos(const char *path,
{
unsigned new_id = type - MENU_SETTINGS_CHEEVOS_START;
menu_dialog_current_id = new_id;
menu_dialog_set_current_id(new_id);
return generic_action_ok_help(path, label, new_id, idx, entry_idx,
MENU_ENUM_LABEL_CHEEVOS_DESCRIPTION,

View File

@ -38,7 +38,7 @@
static bool menu_dialog_pending_push = false;
static bool menu_dialog_active = false;
unsigned menu_dialog_current_id = 0;
static unsigned menu_dialog_current_id = 0;
static enum menu_dialog_type menu_dialog_current_type = MENU_DIALOG_NONE;
static enum msg_hash_enums menu_dialog_current_msg = MSG_UNKNOWN;
@ -300,6 +300,11 @@ void menu_dialog_push(void)
menu_displaylist_ctl(DISPLAYLIST_HELP, &info);
}
void menu_dialog_set_current_id(unsigned id)
{
menu_dialog_current_id = id;
}
void menu_dialog_reset(void)
{
menu_dialog_pending_push = false;

View File

@ -68,6 +68,8 @@ void menu_dialog_show_message(
bool menu_dialog_is_active(void);
void menu_dialog_set_current_id(unsigned id);
void menu_dialog_set_active(bool on);
enum menu_dialog_type menu_dialog_get_current_type(void);