mirror of
https://github.com/libretro/RetroArch
synced 2025-01-30 21:32:45 +00:00
Revert "Put menu_input state on heap"
This reverts commit 807be0a965cb028c5ae84b335320e133cbafb18c.
This commit is contained in:
parent
807be0a965
commit
a892f5901e
@ -197,8 +197,6 @@ void menu_free(menu_handle_t *menu)
|
||||
|
||||
menu_shader_free(menu);
|
||||
|
||||
menu_input_free(menu);
|
||||
|
||||
menu_driver_free(menu);
|
||||
|
||||
#ifdef HAVE_DYNAMIC
|
||||
@ -242,9 +240,6 @@ void *menu_init(const void *data)
|
||||
if (!(menu = (menu_handle_t*)menu_ctx->init()))
|
||||
return NULL;
|
||||
|
||||
if (!menu_input_init(menu))
|
||||
goto error;
|
||||
|
||||
strlcpy(settings->menu.driver, menu_ctx->ident,
|
||||
sizeof(settings->menu.driver));
|
||||
|
||||
|
@ -110,7 +110,7 @@ typedef struct
|
||||
char default_cgp[PATH_MAX_LENGTH];
|
||||
struct video_shader *shader;
|
||||
|
||||
void *input;
|
||||
menu_input_t input;
|
||||
|
||||
content_playlist_t *playlist;
|
||||
char db_playlist_file[PATH_MAX_LENGTH];
|
||||
|
@ -46,7 +46,7 @@ menu_input_t *menu_input_get_ptr(void)
|
||||
menu_handle_t *menu = menu_driver_get_ptr();
|
||||
if (!menu)
|
||||
return NULL;
|
||||
return menu->input;
|
||||
return &menu->input;
|
||||
}
|
||||
|
||||
void menu_input_key_event(bool down, unsigned keycode,
|
||||
@ -1152,30 +1152,3 @@ unsigned menu_input_frame(retro_input_t input, retro_input_t trigger_input)
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
void menu_input_free(void *data)
|
||||
{
|
||||
menu_handle_t *menu = (menu_handle_t*)data;
|
||||
|
||||
if (!menu)
|
||||
return;
|
||||
|
||||
if (menu->input)
|
||||
free(menu->input);
|
||||
menu->input = NULL;
|
||||
}
|
||||
|
||||
bool menu_input_init(void *data)
|
||||
{
|
||||
menu_handle_t *menu = (menu_handle_t*)data;
|
||||
|
||||
if (!menu)
|
||||
return false;
|
||||
|
||||
menu->input = (menu_input_t*)calloc(1, sizeof(*menu->input));
|
||||
|
||||
if (!menu->input)
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
@ -235,10 +235,6 @@ bool menu_input_ctl(enum menu_ctl_state state, void *data);
|
||||
|
||||
menu_input_t *menu_input_get_ptr(void);
|
||||
|
||||
void menu_input_free(void *data);
|
||||
|
||||
bool menu_input_init(void *data);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user