Revert "More cleanups/move more state to menu_popup.c"

This reverts commit a20cd41d4b81b2cb5849587c514c5d5ff4aedafd.
This commit is contained in:
twinaphex 2016-09-04 23:16:06 +02:00
parent 95041d948b
commit 8b793b7924
5 changed files with 9 additions and 45 deletions

View File

@ -27,7 +27,6 @@
#include "../menu_setting.h"
#include "../menu_shader.h"
#include "../menu_navigation.h"
#include "../menu_popup.h"
#include "../menu_content.h"
#include "../../configuration.h"
@ -241,8 +240,9 @@ int generic_action_ok_displaylist_push(const char *path,
break;
case ACTION_OK_DL_HELP:
info_label = label;
menu->help_screen.type = type;
menu->help_screen.push = true;
dl_type = DISPLAYLIST_HELP;
menu_popup_push_pending(menu, true, type);
break;
case ACTION_OK_DL_RPL_ENTRY:
strlcpy(menu->deferred_path, label, sizeof(menu->deferred_path));

View File

@ -28,7 +28,6 @@
#include "menu_content.h"
#include "menu_driver.h"
#include "menu_navigation.h"
#include "menu_popup.h"
#include "menu_cbs.h"
#ifdef HAVE_LIBRETRODB
@ -4178,7 +4177,7 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type, void *data)
case DISPLAYLIST_HELP:
menu_entries_append_enum(info->list, info->path,
info->label, MSG_UNKNOWN, info->type, info->directory_ptr, 0);
menu_popup_push_pending(menu, false, MENU_HELP_NONE);
menu->help_screen.push = false;
break;
case DISPLAYLIST_SETTING_ENUM:
{

View File

@ -24,7 +24,6 @@
#include "menu_cbs.h"
#include "menu_display.h"
#include "menu_navigation.h"
#include "menu_popup.h"
#include "menu_shader.h"
#include "../config.def.h"
@ -172,9 +171,8 @@ static bool menu_init(menu_handle_t *menu_data)
if (settings->menu_show_start_screen)
{
menu_popup_push_pending(menu_data, true,
MENU_HELP_WELCOME);
menu_data->help_screen.push = true;
menu_data->help_screen.type = MENU_HELP_WELCOME;
settings->menu_show_start_screen = false;
command_event(CMD_EVENT_MENU_SAVE_CURRENT_CONFIG, NULL);
}
@ -183,14 +181,15 @@ static bool menu_init(menu_handle_t *menu_data)
&& !string_is_empty(settings->path.bundle_assets_src)
&& !string_is_empty(settings->path.bundle_assets_dst)
#ifdef IOS
&& menu_popup_is_push_pending(menu_data)
&& menu_data->help_screen.push
#else
&& (settings->bundle_assets_extract_version_current
!= settings->bundle_assets_extract_last_version)
#endif
)
{
menu_popup_push_pending(menu_data, true, MENU_HELP_EXTRACT);
menu_data->help_screen.type = MENU_HELP_EXTRACT;
menu_data->help_screen.push = true;
#ifdef HAVE_ZLIB
task_push_decompress(settings->path.bundle_assets_src,
settings->path.bundle_assets_dst,
@ -568,7 +567,6 @@ bool menu_driver_ctl(enum rarch_menu_ctl_state state, void *data)
core_info_deinit_list();
core_info_free_current_core();
menu_popup_deinit(menu_driver_data);
free(menu_driver_data);
}
menu_driver_data = NULL;

View File

@ -220,27 +220,11 @@ int menu_popup_iterate_help(menu_handle_t *menu,
return 0;
}
void menu_popup_push_pending(menu_handle_t *menu,
bool push, enum menu_help_type type)
{
if (!menu)
return;
menu->help_screen.push = push;
menu->help_screen.type = type;
}
bool menu_popup_is_push_pending(menu_handle_t *menu)
{
if (!menu)
return false;
return menu->help_screen.push;
}
void menu_popup_push(menu_handle_t *menu)
{
menu_displaylist_info_t info = {0};
if (!menu_popup_is_push_pending(menu))
if (!menu->help_screen.push)
return;
info.list = menu_entries_get_menu_stack_ptr(0);
@ -251,11 +235,3 @@ void menu_popup_push(menu_handle_t *menu)
menu_displaylist_ctl(DISPLAYLIST_HELP, &info);
}
void menu_popup_deinit(menu_handle_t *menu)
{
if (!menu)
return;
menu->help_screen.push = false;
menu->help_screen.type = MENU_HELP_NONE;
}

View File

@ -20,8 +20,6 @@
#include <stdint.h>
#include <stdlib.h>
#include <boolean.h>
#include <retro_common_api.h>
RETRO_BEGIN_DECLS
@ -29,15 +27,8 @@ RETRO_BEGIN_DECLS
int menu_popup_iterate_help(menu_handle_t *menu,
char *s, size_t len, const char *label);
bool menu_popup_is_push_pending(menu_handle_t *menu);
void menu_popup_push_pending(menu_handle_t *menu,
bool push, enum menu_help_type type);
void menu_popup_push(menu_handle_t *menu);
void menu_popup_deinit(menu_handle_t *menu);
RETRO_END_DECLS
#endif