mirror of
https://github.com/libretro/RetroArch
synced 2025-03-01 16:13:40 +00:00
(Lakka) Move categories over to userdata too
This commit is contained in:
parent
c6a27e46ae
commit
60e5b881b9
@ -44,7 +44,7 @@
|
|||||||
/* Move the categories left or right depending
|
/* Move the categories left or right depending
|
||||||
* on the menu_active_category variable. */
|
* on the menu_active_category variable. */
|
||||||
|
|
||||||
static void lakka_switch_categories(void)
|
static void lakka_switch_categories(lakka_handle_t *lakka)
|
||||||
{
|
{
|
||||||
int i, j;
|
int i, j;
|
||||||
|
|
||||||
@ -57,7 +57,7 @@ static void lakka_switch_categories(void)
|
|||||||
for (i = 0; i < num_categories; i++)
|
for (i = 0; i < num_categories; i++)
|
||||||
{
|
{
|
||||||
float ca, cz;
|
float ca, cz;
|
||||||
menu_category_t *category = (menu_category_t*)&categories[i];
|
menu_category_t *category = (menu_category_t*)&lakka->categories[i];
|
||||||
|
|
||||||
if (!category)
|
if (!category)
|
||||||
continue;
|
continue;
|
||||||
@ -84,11 +84,11 @@ static void lakka_switch_categories(void)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void lakka_switch_items(void)
|
static void lakka_switch_items(lakka_handle_t *lakka)
|
||||||
{
|
{
|
||||||
int j;
|
int j;
|
||||||
menu_category_t *active_category = (menu_category_t*)
|
menu_category_t *active_category = (menu_category_t*)
|
||||||
&categories[menu_active_category];
|
&lakka->categories[menu_active_category];
|
||||||
|
|
||||||
for (j = 0; j < active_category->num_items; j++)
|
for (j = 0; j < active_category->num_items; j++)
|
||||||
{
|
{
|
||||||
@ -117,11 +117,11 @@ static void lakka_switch_items(void)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void lakka_switch_subitems(void)
|
static void lakka_switch_subitems(lakka_handle_t *lakka)
|
||||||
{
|
{
|
||||||
int k;
|
int k;
|
||||||
menu_category_t *active_category = (menu_category_t*)
|
menu_category_t *active_category = (menu_category_t*)
|
||||||
&categories[menu_active_category];
|
&lakka->categories[menu_active_category];
|
||||||
menu_item_t *item = (menu_item_t*)
|
menu_item_t *item = (menu_item_t*)
|
||||||
&active_category->items[active_category->active_item];
|
&active_category->items[active_category->active_item];
|
||||||
|
|
||||||
@ -165,9 +165,9 @@ static void lakka_switch_subitems(void)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void lakka_reset_submenu(int i, int j)
|
static void lakka_reset_submenu(lakka_handle_t *lakka, int i, int j)
|
||||||
{
|
{
|
||||||
menu_category_t *category = (menu_category_t*)&categories[i];
|
menu_category_t *category = (menu_category_t*)&lakka->categories[i];
|
||||||
|
|
||||||
if (!category)
|
if (!category)
|
||||||
return;
|
return;
|
||||||
@ -192,10 +192,10 @@ static void lakka_reset_submenu(int i, int j)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool lakka_on_active_rom(void)
|
static bool lakka_on_active_rom(lakka_handle_t *lakka)
|
||||||
{
|
{
|
||||||
menu_category_t *active_category = (menu_category_t*)
|
menu_category_t *active_category = (menu_category_t*)
|
||||||
&categories[menu_active_category];
|
&lakka->categories[menu_active_category];
|
||||||
|
|
||||||
return !(g_extern.main_is_init
|
return !(g_extern.main_is_init
|
||||||
&& !g_extern.libretro_dummy
|
&& !g_extern.libretro_dummy
|
||||||
@ -204,7 +204,7 @@ static bool lakka_on_active_rom(void)
|
|||||||
active_category->active_item].rom)));
|
active_category->active_item].rom)));
|
||||||
}
|
}
|
||||||
|
|
||||||
static void lakka_open_submenu(void)
|
static void lakka_open_submenu(lakka_handle_t *lakka)
|
||||||
{
|
{
|
||||||
int i, j, k;
|
int i, j, k;
|
||||||
|
|
||||||
@ -213,14 +213,15 @@ static void lakka_open_submenu(void)
|
|||||||
add_tween(LAKKA_DELAY, i_active_alpha, &arrow_alpha, &inOutQuad, NULL);
|
add_tween(LAKKA_DELAY, i_active_alpha, &arrow_alpha, &inOutQuad, NULL);
|
||||||
|
|
||||||
menu_category_t *active_category = (menu_category_t*)
|
menu_category_t *active_category = (menu_category_t*)
|
||||||
&categories[menu_active_category];
|
&lakka->categories[menu_active_category];
|
||||||
|
|
||||||
if (menu_active_category > 0 && lakka_on_active_rom())
|
if (menu_active_category > 0 && lakka_on_active_rom(lakka))
|
||||||
lakka_reset_submenu(menu_active_category, active_category->active_item);
|
lakka_reset_submenu(lakka, menu_active_category,
|
||||||
|
active_category->active_item);
|
||||||
|
|
||||||
for (i = 0; i < num_categories; i++)
|
for (i = 0; i < num_categories; i++)
|
||||||
{
|
{
|
||||||
menu_category_t *category = (menu_category_t*)&categories[i];
|
menu_category_t *category = (menu_category_t*)&lakka->categories[i];
|
||||||
|
|
||||||
if (!category)
|
if (!category)
|
||||||
continue;
|
continue;
|
||||||
@ -263,7 +264,7 @@ static void lakka_open_submenu(void)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void lakka_close_submenu(void)
|
static void lakka_close_submenu(lakka_handle_t *lakka)
|
||||||
{
|
{
|
||||||
int i, j, k;
|
int i, j, k;
|
||||||
|
|
||||||
@ -274,7 +275,7 @@ static void lakka_close_submenu(void)
|
|||||||
for (i = 0; i < num_categories; i++)
|
for (i = 0; i < num_categories; i++)
|
||||||
{
|
{
|
||||||
float ca, cz;
|
float ca, cz;
|
||||||
menu_category_t *category = (menu_category_t*)&categories[i];
|
menu_category_t *category = (menu_category_t*)&lakka->categories[i];
|
||||||
bool is_active_category = (i == menu_active_category);
|
bool is_active_category = (i == menu_active_category);
|
||||||
|
|
||||||
if (!category)
|
if (!category)
|
||||||
@ -322,14 +323,17 @@ static int menu_lakka_iterate(unsigned action)
|
|||||||
menu_category_t *active_category = NULL;
|
menu_category_t *active_category = NULL;
|
||||||
menu_item_t *active_item = NULL;
|
menu_item_t *active_item = NULL;
|
||||||
menu_subitem_t * active_subitem = NULL;
|
menu_subitem_t * active_subitem = NULL;
|
||||||
|
lakka_handle_t *lakka = NULL;
|
||||||
|
|
||||||
if (!driver.menu)
|
if (!driver.menu)
|
||||||
{
|
|
||||||
RARCH_ERR("Cannot iterate menu, menu handle is not initialized.\n");
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
|
||||||
|
|
||||||
active_category = (menu_category_t*)&categories[menu_active_category];
|
lakka = (lakka_handle_t*)driver.menu->userdata;
|
||||||
|
|
||||||
|
if (!lakka)
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
active_category = (menu_category_t*)&lakka->categories[menu_active_category];
|
||||||
|
|
||||||
if (active_category)
|
if (active_category)
|
||||||
active_item = (menu_item_t*)
|
active_item = (menu_item_t*)
|
||||||
@ -388,7 +392,7 @@ static int menu_lakka_iterate(unsigned action)
|
|||||||
if (depth == 0 && menu_active_category > 0)
|
if (depth == 0 && menu_active_category > 0)
|
||||||
{
|
{
|
||||||
menu_active_category--;
|
menu_active_category--;
|
||||||
lakka_switch_categories();
|
lakka_switch_categories(lakka);
|
||||||
}
|
}
|
||||||
else if (depth == 1 && menu_active_category > 0
|
else if (depth == 1 && menu_active_category > 0
|
||||||
&& (active_item->active_subitem == 1
|
&& (active_item->active_subitem == 1
|
||||||
@ -403,7 +407,7 @@ static int menu_lakka_iterate(unsigned action)
|
|||||||
if (depth == 0 && menu_active_category < num_categories-1)
|
if (depth == 0 && menu_active_category < num_categories-1)
|
||||||
{
|
{
|
||||||
menu_active_category++;
|
menu_active_category++;
|
||||||
lakka_switch_categories();
|
lakka_switch_categories(lakka);
|
||||||
}
|
}
|
||||||
else if (depth == 1 && menu_active_category > 0
|
else if (depth == 1 && menu_active_category > 0
|
||||||
&& (active_item->active_subitem == 1
|
&& (active_item->active_subitem == 1
|
||||||
@ -420,7 +424,7 @@ static int menu_lakka_iterate(unsigned action)
|
|||||||
(active_category->num_items - 1)))
|
(active_category->num_items - 1)))
|
||||||
{
|
{
|
||||||
active_category->active_item++;
|
active_category->active_item++;
|
||||||
lakka_switch_items();
|
lakka_switch_items(lakka);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* If we are on subitems level, and we do not
|
/* If we are on subitems level, and we do not
|
||||||
@ -437,7 +441,7 @@ static int menu_lakka_iterate(unsigned action)
|
|||||||
&& (!strcmp(g_extern.fullpath, active_item->rom)))))
|
&& (!strcmp(g_extern.fullpath, active_item->rom)))))
|
||||||
{
|
{
|
||||||
active_item->active_subitem++;
|
active_item->active_subitem++;
|
||||||
lakka_switch_subitems();
|
lakka_switch_subitems(lakka);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@ -445,12 +449,12 @@ static int menu_lakka_iterate(unsigned action)
|
|||||||
if (depth == 0 && active_category->active_item > 0)
|
if (depth == 0 && active_category->active_item > 0)
|
||||||
{
|
{
|
||||||
active_category->active_item--;
|
active_category->active_item--;
|
||||||
lakka_switch_items();
|
lakka_switch_items(lakka);
|
||||||
}
|
}
|
||||||
if (depth == 1 && active_item->active_subitem > 0)
|
if (depth == 1 && active_item->active_subitem > 0)
|
||||||
{
|
{
|
||||||
active_item->active_subitem--;
|
active_item->active_subitem--;
|
||||||
lakka_switch_subitems();
|
lakka_switch_subitems(lakka);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@ -499,7 +503,7 @@ static int menu_lakka_iterate(unsigned action)
|
|||||||
}
|
}
|
||||||
else if (depth == 0 && active_item->num_subitems)
|
else if (depth == 0 && active_item->num_subitems)
|
||||||
{
|
{
|
||||||
lakka_open_submenu();
|
lakka_open_submenu(lakka);
|
||||||
depth = 1;
|
depth = 1;
|
||||||
}
|
}
|
||||||
else if (depth == 0 &&
|
else if (depth == 0 &&
|
||||||
@ -517,7 +521,7 @@ static int menu_lakka_iterate(unsigned action)
|
|||||||
case MENU_ACTION_CANCEL:
|
case MENU_ACTION_CANCEL:
|
||||||
if (depth == 1)
|
if (depth == 1)
|
||||||
{
|
{
|
||||||
lakka_close_submenu();
|
lakka_close_submenu(lakka);
|
||||||
depth = 0;
|
depth = 0;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -45,7 +45,6 @@
|
|||||||
#include "tween.h"
|
#include "tween.h"
|
||||||
|
|
||||||
// Category variables
|
// Category variables
|
||||||
menu_category_t *categories;
|
|
||||||
int depth = 0;
|
int depth = 0;
|
||||||
int num_categories = 0;
|
int num_categories = 0;
|
||||||
int menu_active_category = 0;
|
int menu_active_category = 0;
|
||||||
@ -94,36 +93,6 @@ static const GLfloat tex_coord[] = {
|
|||||||
1, 0,
|
1, 0,
|
||||||
};
|
};
|
||||||
|
|
||||||
enum
|
|
||||||
{
|
|
||||||
TEXTURE_MAIN = 0,
|
|
||||||
TEXTURE_FONT,
|
|
||||||
TEXTURE_BG,
|
|
||||||
TEXTURE_SETTINGS,
|
|
||||||
TEXTURE_SETTING,
|
|
||||||
TEXTURE_SUBSETTING,
|
|
||||||
TEXTURE_ARROW,
|
|
||||||
TEXTURE_RUN,
|
|
||||||
TEXTURE_RESUME,
|
|
||||||
TEXTURE_SAVESTATE,
|
|
||||||
TEXTURE_LOADSTATE,
|
|
||||||
TEXTURE_SCREENSHOT,
|
|
||||||
TEXTURE_RELOAD,
|
|
||||||
TEXTURE_LAST
|
|
||||||
};
|
|
||||||
|
|
||||||
struct lakka_texture_item
|
|
||||||
{
|
|
||||||
GLuint id;
|
|
||||||
char path[PATH_MAX];
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
typedef struct lakka_handle
|
|
||||||
{
|
|
||||||
struct lakka_texture_item textures[TEXTURE_LAST];
|
|
||||||
} lakka_handle_t;
|
|
||||||
|
|
||||||
static void lakka_responsive(void)
|
static void lakka_responsive(void)
|
||||||
{
|
{
|
||||||
gl_t *gl = (gl_t*)driver_video_resolve(NULL);
|
gl_t *gl = (gl_t*)driver_video_resolve(NULL);
|
||||||
@ -305,6 +274,7 @@ void lakka_draw_background(void)
|
|||||||
float alpha = 0.9f;
|
float alpha = 0.9f;
|
||||||
gl_t *gl = NULL;
|
gl_t *gl = NULL;
|
||||||
lakka_handle_t *lakka = NULL;
|
lakka_handle_t *lakka = NULL;
|
||||||
|
|
||||||
GLfloat color[] = {
|
GLfloat color[] = {
|
||||||
1.0f, 1.0f, 1.0f, global_alpha,
|
1.0f, 1.0f, 1.0f, global_alpha,
|
||||||
1.0f, 1.0f, 1.0f, global_alpha,
|
1.0f, 1.0f, 1.0f, global_alpha,
|
||||||
@ -423,16 +393,13 @@ static void lakka_draw_arrow(lakka_handle_t *lakka)
|
|||||||
static void lakka_draw_subitems(lakka_handle_t *lakka, int i, int j)
|
static void lakka_draw_subitems(lakka_handle_t *lakka, int i, int j)
|
||||||
{
|
{
|
||||||
int k;
|
int k;
|
||||||
menu_category_t *category = (menu_category_t*)&categories[i];
|
menu_category_t *category = (menu_category_t*)&lakka->categories[i];
|
||||||
menu_item_t *item = (menu_item_t*)&category->items[j];
|
menu_item_t *item = (menu_item_t*)&category->items[j];
|
||||||
menu_category_t *active_category = (menu_category_t*)
|
menu_category_t *active_category = (menu_category_t*)
|
||||||
&categories[menu_active_category];
|
&lakka->categories[menu_active_category];
|
||||||
menu_item_t *active_item = (menu_item_t*)
|
menu_item_t *active_item = (menu_item_t*)
|
||||||
&active_category->items[active_category->active_item];
|
&active_category->items[active_category->active_item];
|
||||||
|
|
||||||
if (!lakka)
|
|
||||||
return;
|
|
||||||
|
|
||||||
for(k = 0; k < item->num_subitems; k++)
|
for(k = 0; k < item->num_subitems; k++)
|
||||||
{
|
{
|
||||||
menu_subitem_t *subitem = (menu_subitem_t*)&item->subitems[k];
|
menu_subitem_t *subitem = (menu_subitem_t*)&item->subitems[k];
|
||||||
@ -513,9 +480,9 @@ static void lakka_draw_subitems(lakka_handle_t *lakka, int i, int j)
|
|||||||
static void lakka_draw_items(lakka_handle_t *lakka, int i)
|
static void lakka_draw_items(lakka_handle_t *lakka, int i)
|
||||||
{
|
{
|
||||||
int j;
|
int j;
|
||||||
menu_category_t *category = (menu_category_t*)&categories[i];
|
menu_category_t *category = (menu_category_t*)&lakka->categories[i];
|
||||||
menu_category_t *active_category = (menu_category_t*)
|
menu_category_t *active_category = (menu_category_t*)
|
||||||
&categories[menu_active_category];
|
&lakka->categories[menu_active_category];
|
||||||
menu_item_t *active_item = (menu_item_t*)
|
menu_item_t *active_item = (menu_item_t*)
|
||||||
&active_category->items[active_category->active_item];
|
&active_category->items[active_category->active_item];
|
||||||
|
|
||||||
@ -566,7 +533,7 @@ static void lakka_draw_categories(lakka_handle_t *lakka)
|
|||||||
|
|
||||||
for(i = 0; i < num_categories; i++)
|
for(i = 0; i < num_categories; i++)
|
||||||
{
|
{
|
||||||
menu_category_t *category = (menu_category_t*)&categories[i];
|
menu_category_t *category = (menu_category_t*)&lakka->categories[i];
|
||||||
|
|
||||||
if (!category)
|
if (!category)
|
||||||
continue;
|
continue;
|
||||||
@ -700,7 +667,7 @@ static void lakka_frame(void)
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
active_category = (menu_category_t*)
|
active_category = (menu_category_t*)
|
||||||
&categories[menu_active_category];
|
&lakka->categories[menu_active_category];
|
||||||
|
|
||||||
if (!active_category)
|
if (!active_category)
|
||||||
return;
|
return;
|
||||||
@ -811,7 +778,7 @@ static void lakka_context_destroy(void *data)
|
|||||||
|
|
||||||
for (i = 1; i < num_categories; i++)
|
for (i = 1; i < num_categories; i++)
|
||||||
{
|
{
|
||||||
menu_category_t *category = (menu_category_t*)&categories[i];
|
menu_category_t *category = (menu_category_t*)&lakka->categories[i];
|
||||||
|
|
||||||
if (!category)
|
if (!category)
|
||||||
continue;
|
continue;
|
||||||
@ -843,8 +810,16 @@ static void lakka_context_destroy(void *data)
|
|||||||
static bool lakka_init_settings(menu_handle_t *menu)
|
static bool lakka_init_settings(menu_handle_t *menu)
|
||||||
{
|
{
|
||||||
int j, k, jj = 0, kk;
|
int j, k, jj = 0, kk;
|
||||||
|
lakka_handle_t *lakka = NULL;
|
||||||
|
menu_category_t *category = NULL;
|
||||||
rarch_setting_t *setting_data = (rarch_setting_t*)menu->list_settings;
|
rarch_setting_t *setting_data = (rarch_setting_t*)menu->list_settings;
|
||||||
menu_category_t *category = (menu_category_t*)&categories[0];
|
|
||||||
|
lakka = (lakka_handle_t*)menu->userdata;
|
||||||
|
|
||||||
|
if (!lakka)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
category = (menu_category_t*)&lakka->categories[0];
|
||||||
|
|
||||||
if (!setting_data || !category)
|
if (!setting_data || !category)
|
||||||
return false;
|
return false;
|
||||||
@ -954,7 +929,7 @@ static void lakka_settings_context_reset(void)
|
|||||||
if (!lakka)
|
if (!lakka)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
category = (menu_category_t*)&categories[0];
|
category = (menu_category_t*)&lakka->categories[0];
|
||||||
|
|
||||||
if (!category)
|
if (!category)
|
||||||
return;
|
return;
|
||||||
@ -1030,7 +1005,7 @@ static void lakka_context_reset(void *data)
|
|||||||
lakka_settings_context_reset();
|
lakka_settings_context_reset();
|
||||||
for (i = 1; i < num_categories; i++)
|
for (i = 1; i < num_categories; i++)
|
||||||
{
|
{
|
||||||
menu_category_t *category = (menu_category_t*)&categories[i];
|
menu_category_t *category = (menu_category_t*)&lakka->categories[i];
|
||||||
|
|
||||||
char core_id[256], texturepath[256], content_texturepath[256],
|
char core_id[256], texturepath[256], content_texturepath[256],
|
||||||
mediapath[256], themepath[256];
|
mediapath[256], themepath[256];
|
||||||
@ -1209,7 +1184,8 @@ static void lakka_free(void *data)
|
|||||||
g_extern.core_info = NULL;
|
g_extern.core_info = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int lakka_input_postprocess(retro_input_t state, retro_input_t old_state)
|
static int lakka_input_postprocess(retro_input_t state,
|
||||||
|
retro_input_t old_state)
|
||||||
{
|
{
|
||||||
if (global_alpha == 0.0f)
|
if (global_alpha == 0.0f)
|
||||||
add_tween(LAKKA_DELAY, 1.0f, &global_alpha, &inOutQuad, NULL);
|
add_tween(LAKKA_DELAY, 1.0f, &global_alpha, &inOutQuad, NULL);
|
||||||
@ -1237,7 +1213,8 @@ static void lakka_init_core_info(void *data)
|
|||||||
|
|
||||||
static void *lakka_init(void)
|
static void *lakka_init(void)
|
||||||
{
|
{
|
||||||
menu_handle_t *menu;
|
menu_handle_t *menu = NULL;
|
||||||
|
lakka_handle_t *lakka = NULL;
|
||||||
const video_driver_t *video_driver = NULL;
|
const video_driver_t *video_driver = NULL;
|
||||||
gl_t *gl = (gl_t*)driver_video_resolve(&video_driver);
|
gl_t *gl = (gl_t*)driver_video_resolve(&video_driver);
|
||||||
|
|
||||||
@ -1255,20 +1232,26 @@ static void *lakka_init(void)
|
|||||||
lakka_responsive();
|
lakka_responsive();
|
||||||
|
|
||||||
lakka_init_core_info(menu);
|
lakka_init_core_info(menu);
|
||||||
categories = (menu_category_t*)
|
|
||||||
calloc(num_categories, sizeof(menu_category_t));
|
|
||||||
|
|
||||||
if (!categories)
|
|
||||||
{
|
|
||||||
free(menu);
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
menu->userdata = (lakka_handle_t*)calloc(1, sizeof(lakka_handle_t));
|
menu->userdata = (lakka_handle_t*)calloc(1, sizeof(lakka_handle_t));
|
||||||
|
|
||||||
if (!menu->userdata)
|
if (!menu->userdata)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
|
lakka = (lakka_handle_t*)menu->userdata;
|
||||||
|
|
||||||
|
if (!lakka)
|
||||||
|
return NULL;
|
||||||
|
|
||||||
|
lakka->categories = (menu_category_t*)
|
||||||
|
calloc(num_categories, sizeof(menu_category_t));
|
||||||
|
|
||||||
|
if (!lakka->categories)
|
||||||
|
{
|
||||||
|
free(menu);
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
return menu;
|
return menu;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1276,17 +1259,23 @@ static bool lakka_init_lists(void *data)
|
|||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
menu_handle_t *menu = (menu_handle_t*)data;
|
menu_handle_t *menu = (menu_handle_t*)data;
|
||||||
|
lakka_handle_t *lakka = NULL;
|
||||||
|
|
||||||
if (!menu)
|
if (!menu)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
lakka = (lakka_handle_t*)menu->userdata;
|
||||||
|
|
||||||
|
if (!lakka)
|
||||||
|
return false;
|
||||||
|
|
||||||
if (!lakka_init_settings(menu))
|
if (!lakka_init_settings(menu))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
for (i = 1; i < num_categories; i++)
|
for (i = 1; i < num_categories; i++)
|
||||||
{
|
{
|
||||||
core_info_t *info = NULL;
|
core_info_t *info = NULL;
|
||||||
menu_category_t *category = (menu_category_t*)&categories[i];
|
menu_category_t *category = (menu_category_t*)&lakka->categories[i];
|
||||||
core_info_list_t *info_list = (core_info_list_t*)g_extern.core_info;
|
core_info_list_t *info_list = (core_info_list_t*)g_extern.core_info;
|
||||||
|
|
||||||
if (info_list)
|
if (info_list)
|
||||||
|
@ -27,6 +27,24 @@
|
|||||||
#define LAKKA_DELAY 0.02
|
#define LAKKA_DELAY 0.02
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
enum
|
||||||
|
{
|
||||||
|
TEXTURE_MAIN = 0,
|
||||||
|
TEXTURE_FONT,
|
||||||
|
TEXTURE_BG,
|
||||||
|
TEXTURE_SETTINGS,
|
||||||
|
TEXTURE_SETTING,
|
||||||
|
TEXTURE_SUBSETTING,
|
||||||
|
TEXTURE_ARROW,
|
||||||
|
TEXTURE_RUN,
|
||||||
|
TEXTURE_RESUME,
|
||||||
|
TEXTURE_SAVESTATE,
|
||||||
|
TEXTURE_LOADSTATE,
|
||||||
|
TEXTURE_SCREENSHOT,
|
||||||
|
TEXTURE_RELOAD,
|
||||||
|
TEXTURE_LAST
|
||||||
|
};
|
||||||
|
|
||||||
extern int depth;
|
extern int depth;
|
||||||
extern int num_categories;
|
extern int num_categories;
|
||||||
extern float all_categories_x;
|
extern float all_categories_x;
|
||||||
@ -84,6 +102,18 @@ typedef struct
|
|||||||
menu_item_t *items;
|
menu_item_t *items;
|
||||||
} menu_category_t;
|
} menu_category_t;
|
||||||
|
|
||||||
extern menu_category_t *categories;
|
|
||||||
|
struct lakka_texture_item
|
||||||
|
{
|
||||||
|
GLuint id;
|
||||||
|
char path[PATH_MAX];
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
typedef struct lakka_handle
|
||||||
|
{
|
||||||
|
menu_category_t *categories;
|
||||||
|
struct lakka_texture_item textures[TEXTURE_LAST];
|
||||||
|
} lakka_handle_t;
|
||||||
|
|
||||||
#endif /* MENU_DISP_LAKKA_H */
|
#endif /* MENU_DISP_LAKKA_H */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user