Add zarch_iterate
This commit is contained in:
parent
6d4900dc1c
commit
b6bd6152a0
|
@ -33,23 +33,6 @@
|
||||||
|
|
||||||
#include "../../runloop.h"
|
#include "../../runloop.h"
|
||||||
|
|
||||||
enum menu_state_changes
|
|
||||||
{
|
|
||||||
MENU_STATE_RENDER_FRAMEBUFFER = 0,
|
|
||||||
MENU_STATE_RENDER_MESSAGEBOX,
|
|
||||||
MENU_STATE_BLIT,
|
|
||||||
MENU_STATE_POP_STACK,
|
|
||||||
MENU_STATE_POST_ITERATE
|
|
||||||
};
|
|
||||||
|
|
||||||
enum action_iterate_type
|
|
||||||
{
|
|
||||||
ITERATE_TYPE_DEFAULT = 0,
|
|
||||||
ITERATE_TYPE_HELP,
|
|
||||||
ITERATE_TYPE_INFO,
|
|
||||||
ITERATE_TYPE_BIND
|
|
||||||
};
|
|
||||||
|
|
||||||
static int action_iterate_help(char *s, size_t len, const char *label)
|
static int action_iterate_help(char *s, size_t len, const char *label)
|
||||||
{
|
{
|
||||||
menu_handle_t *menu = menu_driver_get_ptr();
|
menu_handle_t *menu = menu_driver_get_ptr();
|
||||||
|
|
|
@ -22,6 +22,23 @@
|
||||||
|
|
||||||
#include "../menu_input.h"
|
#include "../menu_input.h"
|
||||||
|
|
||||||
|
enum menu_state_changes
|
||||||
|
{
|
||||||
|
MENU_STATE_RENDER_FRAMEBUFFER = 0,
|
||||||
|
MENU_STATE_RENDER_MESSAGEBOX,
|
||||||
|
MENU_STATE_BLIT,
|
||||||
|
MENU_STATE_POP_STACK,
|
||||||
|
MENU_STATE_POST_ITERATE
|
||||||
|
};
|
||||||
|
|
||||||
|
enum action_iterate_type
|
||||||
|
{
|
||||||
|
ITERATE_TYPE_DEFAULT = 0,
|
||||||
|
ITERATE_TYPE_HELP,
|
||||||
|
ITERATE_TYPE_INFO,
|
||||||
|
ITERATE_TYPE_BIND
|
||||||
|
};
|
||||||
|
|
||||||
int generic_menu_iterate(bool render_this_frame, enum menu_action action);
|
int generic_menu_iterate(bool render_this_frame, enum menu_action action);
|
||||||
|
|
||||||
bool generic_menu_init_list(void *data);
|
bool generic_menu_init_list(void *data);
|
||||||
|
|
|
@ -851,8 +851,8 @@ static int rgui_environ(menu_environ_cb_t type, void *data)
|
||||||
|
|
||||||
menu_ctx_driver_t menu_ctx_rgui = {
|
menu_ctx_driver_t menu_ctx_rgui = {
|
||||||
rgui_set_texture,
|
rgui_set_texture,
|
||||||
generic_menu_iterate,
|
|
||||||
rgui_set_message,
|
rgui_set_message,
|
||||||
|
generic_menu_iterate,
|
||||||
rgui_render,
|
rgui_render,
|
||||||
NULL,
|
NULL,
|
||||||
rgui_init,
|
rgui_init,
|
||||||
|
|
|
@ -1005,10 +1005,26 @@ static void zarch_context_reset(void)
|
||||||
settings->menu.wallpaper, "cb_menu_wallpaper", 0, 1, true);
|
settings->menu.wallpaper, "cb_menu_wallpaper", 0, 1, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int zarch_iterate(bool render_this_frame, enum menu_action action)
|
||||||
|
{
|
||||||
|
menu_handle_t *menu = menu_driver_get_ptr();
|
||||||
|
|
||||||
|
if (!menu)
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
if (render_this_frame)
|
||||||
|
{
|
||||||
|
BIT64_SET(menu->state, MENU_STATE_RENDER_FRAMEBUFFER);
|
||||||
|
BIT64_SET(menu->state, MENU_STATE_BLIT);
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
menu_ctx_driver_t menu_ctx_zarch = {
|
menu_ctx_driver_t menu_ctx_zarch = {
|
||||||
NULL,
|
NULL,
|
||||||
zarch_get_message,
|
zarch_get_message,
|
||||||
generic_menu_iterate,
|
zarch_iterate,
|
||||||
zarch_render,
|
zarch_render,
|
||||||
zarch_frame,
|
zarch_frame,
|
||||||
zarch_init,
|
zarch_init,
|
||||||
|
|
Loading…
Reference in New Issue