Move hex32_to_rgba_normalized to materialui.c

This commit is contained in:
twinaphex 2020-02-17 04:01:58 +01:00
parent a0f3010159
commit cccf8a9870
3 changed files with 8 additions and 10 deletions

View File

@ -1366,6 +1366,14 @@ typedef struct materialui_handle
} materialui_handle_t;
static void hex32_to_rgba_normalized(uint32_t hex, float* rgba, float alpha)
{
rgba[0] = rgba[4] = rgba[8] = rgba[12] = ((hex >> 16) & 0xFF) * (1.0f / 255.0f); /* r */
rgba[1] = rgba[5] = rgba[9] = rgba[13] = ((hex >> 8 ) & 0xFF) * (1.0f / 255.0f); /* g */
rgba[2] = rgba[6] = rgba[10] = rgba[14] = ((hex >> 0 ) & 0xFF) * (1.0f / 255.0f); /* b */
rgba[3] = rgba[7] = rgba[11] = rgba[15] = alpha;
}
static const materialui_theme_t *materialui_get_theme(enum materialui_color_theme color_theme)
{
switch (color_theme)

View File

@ -2496,14 +2496,6 @@ bool menu_driver_ctl(enum rarch_menu_ctl_state state, void *data)
return true;
}
void hex32_to_rgba_normalized(uint32_t hex, float* rgba, float alpha)
{
rgba[0] = rgba[4] = rgba[8] = rgba[12] = ((hex >> 16) & 0xFF) * (1.0f / 255.0f); /* r */
rgba[1] = rgba[5] = rgba[9] = rgba[13] = ((hex >> 8 ) & 0xFF) * (1.0f / 255.0f); /* g */
rgba[2] = rgba[6] = rgba[10] = rgba[14] = ((hex >> 0 ) & 0xFF) * (1.0f / 255.0f); /* b */
rgba[3] = rgba[7] = rgba[11] = rgba[15] = alpha;
}
void get_current_menu_value(char* retstr, size_t max)
{
const char* entry_label;

View File

@ -478,8 +478,6 @@ void menu_display_handle_wallpaper_upload(retro_task_t *task,
void menu_driver_destroy(void);
void hex32_to_rgba_normalized(uint32_t hex, float* rgba, float alpha);
menu_handle_t *menu_driver_get_ptr(void);
extern menu_ctx_driver_t menu_ctx_ozone;