Make multirom_theme structs static
This commit is contained in:
		@@ -227,20 +227,16 @@ static void center_rom_name(tab_data_roms *d, const char *name)
 | 
			
		||||
    d->rom_name->head.x = center_x(HEADER_WIDTH, fb_width-BOOTBTN_W-HEADER_WIDTH-20, SIZE_NORMAL, name);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
multirom_theme *init_theme_info_1280x800(void)
 | 
			
		||||
{
 | 
			
		||||
    multirom_theme *t = mzalloc(sizeof(multirom_theme));
 | 
			
		||||
    t->width = 1280;
 | 
			
		||||
    t->height = 800;
 | 
			
		||||
const struct multirom_theme theme_info_1280x800 = {
 | 
			
		||||
    .width = 1280,
 | 
			
		||||
    .height = 800,
 | 
			
		||||
 | 
			
		||||
    t->destroy = &destroy;
 | 
			
		||||
    t->init_header = &init_header;
 | 
			
		||||
    t->header_select = &header_select;
 | 
			
		||||
    t->tab_rom_init = &tab_rom_init;
 | 
			
		||||
    t->tab_misc_init = &tab_misc_init;
 | 
			
		||||
    t->get_tab_width = &get_tab_width;
 | 
			
		||||
    t->get_tab_height = &get_tab_height;
 | 
			
		||||
    t->center_rom_name = ¢er_rom_name;
 | 
			
		||||
 | 
			
		||||
    return t;
 | 
			
		||||
}
 | 
			
		||||
    .destroy = &destroy,
 | 
			
		||||
    .init_header = &init_header,
 | 
			
		||||
    .header_select = &header_select,
 | 
			
		||||
    .tab_rom_init = &tab_rom_init,
 | 
			
		||||
    .tab_misc_init = &tab_misc_init,
 | 
			
		||||
    .get_tab_width = &get_tab_width,
 | 
			
		||||
    .get_tab_height = &get_tab_height,
 | 
			
		||||
    .center_rom_name = ¢er_rom_name
 | 
			
		||||
};
 | 
			
		||||
 
 | 
			
		||||
@@ -234,20 +234,16 @@ static void center_rom_name(tab_data_roms *d, const char *name)
 | 
			
		||||
    d->rom_name->head.x = center_x(0, fb_width-BOOTBTN_W-20, SIZE_NORMAL, name);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
multirom_theme *init_theme_info_800x1280(void)
 | 
			
		||||
{
 | 
			
		||||
    multirom_theme *t = mzalloc(sizeof(multirom_theme));
 | 
			
		||||
    t->width = 800;
 | 
			
		||||
    t->height = 1280;
 | 
			
		||||
const struct multirom_theme theme_info_800x1280 = {
 | 
			
		||||
    .width = 800,
 | 
			
		||||
    .height = 1280,
 | 
			
		||||
 | 
			
		||||
    t->destroy = &destroy;
 | 
			
		||||
    t->init_header = &init_header;
 | 
			
		||||
    t->header_select = &header_select;
 | 
			
		||||
    t->tab_rom_init = &tab_rom_init;
 | 
			
		||||
    t->tab_misc_init = &tab_misc_init;
 | 
			
		||||
    t->get_tab_width = &get_tab_width;
 | 
			
		||||
    t->get_tab_height = &get_tab_height;
 | 
			
		||||
    t->center_rom_name = ¢er_rom_name;
 | 
			
		||||
 | 
			
		||||
    return t;
 | 
			
		||||
}
 | 
			
		||||
    .destroy = &destroy,
 | 
			
		||||
    .init_header = &init_header,
 | 
			
		||||
    .header_select = &header_select,
 | 
			
		||||
    .tab_rom_init = &tab_rom_init,
 | 
			
		||||
    .tab_misc_init = &tab_misc_init,
 | 
			
		||||
    .get_tab_width = &get_tab_width,
 | 
			
		||||
    .get_tab_height = &get_tab_height,
 | 
			
		||||
    .center_rom_name = ¢er_rom_name
 | 
			
		||||
};
 | 
			
		||||
 
 | 
			
		||||
@@ -27,18 +27,22 @@ multirom_themes_info *multirom_ui_init_themes(void)
 | 
			
		||||
    i->data = mzalloc(sizeof(multirom_theme_data));
 | 
			
		||||
    i->data->selected_tab = -1;
 | 
			
		||||
 | 
			
		||||
#define ADD_THEME(RES) \
 | 
			
		||||
    extern struct multirom_theme theme_info_ ## RES; \
 | 
			
		||||
    list_add(&theme_info_ ## RES, &i->themes);
 | 
			
		||||
 | 
			
		||||
#ifdef MULTIROM_THEME_800x1280
 | 
			
		||||
    list_add(init_theme_info_800x1280(), &i->themes);
 | 
			
		||||
    ADD_THEME(800x1280);
 | 
			
		||||
#endif
 | 
			
		||||
#ifdef MULTIROM_THEME_1280x800
 | 
			
		||||
    list_add(init_theme_info_1280x800(), &i->themes);
 | 
			
		||||
    ADD_THEME(1280x800);
 | 
			
		||||
#endif
 | 
			
		||||
    return i;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void multirom_ui_free_themes(multirom_themes_info *i)
 | 
			
		||||
{
 | 
			
		||||
    list_clear(&i->themes, &free);
 | 
			
		||||
    list_clear(&i->themes, NULL);
 | 
			
		||||
    free(i->data);
 | 
			
		||||
    free(i);
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -77,12 +77,4 @@ multirom_themes_info *multirom_ui_init_themes(void);
 | 
			
		||||
void multirom_ui_free_themes(multirom_themes_info *info);
 | 
			
		||||
multirom_theme *multirom_ui_select_theme(multirom_themes_info *i, int w, int h);
 | 
			
		||||
 | 
			
		||||
#ifdef MULTIROM_THEME_800x1280
 | 
			
		||||
multirom_theme *init_theme_info_800x1280(void);
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#ifdef MULTIROM_THEME_1280x800
 | 
			
		||||
multirom_theme *init_theme_info_1280x800(void);
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user