mirror of
https://github.com/libretro/RetroArch
synced 2025-02-20 15:40:44 +00:00
Remove getter gfx_widget_get_backdrop_orig
This commit is contained in:
parent
20371e5102
commit
f82b357f86
@ -55,13 +55,6 @@ static float gfx_widgets_pure_white[16] = {
|
|||||||
1.00, 1.00, 1.00, 1.00,
|
1.00, 1.00, 1.00, 1.00,
|
||||||
};
|
};
|
||||||
|
|
||||||
static float gfx_widgets_backdrop_orig[16] = {
|
|
||||||
0.00, 0.00, 0.00, 0.75,
|
|
||||||
0.00, 0.00, 0.00, 0.75,
|
|
||||||
0.00, 0.00, 0.00, 0.75,
|
|
||||||
0.00, 0.00, 0.00, 0.75,
|
|
||||||
};
|
|
||||||
|
|
||||||
/* Icons */
|
/* Icons */
|
||||||
static const char
|
static const char
|
||||||
*gfx_widgets_icons_names[MENU_WIDGETS_ICON_LAST] = {
|
*gfx_widgets_icons_names[MENU_WIDGETS_ICON_LAST] = {
|
||||||
@ -87,11 +80,6 @@ static void INLINE gfx_widgets_font_free(gfx_widget_font_data_t *font_data)
|
|||||||
font_data->usage_count = 0;
|
font_data->usage_count = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
float *gfx_widgets_get_backdrop_orig(void)
|
|
||||||
{
|
|
||||||
return gfx_widgets_backdrop_orig;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Widgets list */
|
/* Widgets list */
|
||||||
const static gfx_widget_t* const widgets[] = {
|
const static gfx_widget_t* const widgets[] = {
|
||||||
#ifdef HAVE_SCREENSHOTS
|
#ifdef HAVE_SCREENSHOTS
|
||||||
@ -1020,7 +1008,7 @@ static int gfx_widgets_draw_indicator(
|
|||||||
{
|
{
|
||||||
unsigned width;
|
unsigned width;
|
||||||
|
|
||||||
gfx_display_set_alpha(gfx_widgets_backdrop_orig, DEFAULT_BACKDROP);
|
gfx_display_set_alpha(p_dispwidget->backdrop_orig, DEFAULT_BACKDROP);
|
||||||
|
|
||||||
if (icon)
|
if (icon)
|
||||||
{
|
{
|
||||||
@ -1032,7 +1020,7 @@ static int gfx_widgets_draw_indicator(
|
|||||||
top_right_x_advance - width, y,
|
top_right_x_advance - width, y,
|
||||||
width, height,
|
width, height,
|
||||||
video_width, video_height,
|
video_width, video_height,
|
||||||
gfx_widgets_backdrop_orig
|
p_dispwidget->backdrop_orig
|
||||||
);
|
);
|
||||||
|
|
||||||
gfx_display_set_alpha(gfx_widgets_pure_white, 1.0f);
|
gfx_display_set_alpha(gfx_widgets_pure_white, 1.0f);
|
||||||
@ -1065,7 +1053,7 @@ static int gfx_widgets_draw_indicator(
|
|||||||
top_right_x_advance - width, y,
|
top_right_x_advance - width, y,
|
||||||
width, height,
|
width, height,
|
||||||
video_width, video_height,
|
video_width, video_height,
|
||||||
gfx_widgets_backdrop_orig
|
p_dispwidget->backdrop_orig
|
||||||
);
|
);
|
||||||
|
|
||||||
gfx_widgets_draw_text(&p_dispwidget->gfx_widget_fonts.regular,
|
gfx_widgets_draw_text(&p_dispwidget->gfx_widget_fonts.regular,
|
||||||
@ -1554,7 +1542,7 @@ void gfx_widgets_frame(void *data)
|
|||||||
* not bleed off the edge of the screen */
|
* not bleed off the edge of the screen */
|
||||||
status_text_x = (status_text_x < 0) ? 0 : status_text_x;
|
status_text_x = (status_text_x < 0) ? 0 : status_text_x;
|
||||||
|
|
||||||
gfx_display_set_alpha(gfx_widgets_backdrop_orig, DEFAULT_BACKDROP);
|
gfx_display_set_alpha(p_dispwidget->backdrop_orig, DEFAULT_BACKDROP);
|
||||||
|
|
||||||
gfx_display_draw_quad(userdata,
|
gfx_display_draw_quad(userdata,
|
||||||
video_width,
|
video_width,
|
||||||
@ -1564,7 +1552,7 @@ void gfx_widgets_frame(void *data)
|
|||||||
p_dispwidget->simple_widget_height,
|
p_dispwidget->simple_widget_height,
|
||||||
video_width,
|
video_width,
|
||||||
video_height,
|
video_height,
|
||||||
gfx_widgets_backdrop_orig
|
p_dispwidget->backdrop_orig
|
||||||
);
|
);
|
||||||
|
|
||||||
gfx_widgets_draw_text(&p_dispwidget->gfx_widget_fonts.regular,
|
gfx_widgets_draw_text(&p_dispwidget->gfx_widget_fonts.regular,
|
||||||
@ -1908,6 +1896,7 @@ bool gfx_widgets_init(uintptr_t widgets_active_ptr,
|
|||||||
|
|
||||||
if (!gfx_display_init_first_driver(video_is_threaded))
|
if (!gfx_display_init_first_driver(video_is_threaded))
|
||||||
goto error;
|
goto error;
|
||||||
|
gfx_display_set_alpha(p_dispwidget->backdrop_orig, 0.75f);
|
||||||
|
|
||||||
if (!p_dispwidget->widgets_inited)
|
if (!p_dispwidget->widgets_inited)
|
||||||
{
|
{
|
||||||
|
@ -209,6 +209,7 @@ typedef struct dispgfx_widget
|
|||||||
unsigned divider_width_1px;
|
unsigned divider_width_1px;
|
||||||
|
|
||||||
float last_scale_factor;
|
float last_scale_factor;
|
||||||
|
float backdrop_orig[16];
|
||||||
#ifdef HAVE_TRANSLATE
|
#ifdef HAVE_TRANSLATE
|
||||||
unsigned ai_service_overlay_width;
|
unsigned ai_service_overlay_width;
|
||||||
unsigned ai_service_overlay_height;
|
unsigned ai_service_overlay_height;
|
||||||
@ -268,8 +269,6 @@ struct gfx_widget
|
|||||||
void (*frame)(void* data, void *userdata);
|
void (*frame)(void* data, void *userdata);
|
||||||
};
|
};
|
||||||
|
|
||||||
float* gfx_widgets_get_backdrop_orig(void);
|
|
||||||
|
|
||||||
float gfx_widgets_get_thumbnail_scale_factor(
|
float gfx_widgets_get_thumbnail_scale_factor(
|
||||||
const float dst_width, const float dst_height,
|
const float dst_width, const float dst_height,
|
||||||
const float image_width, const float image_height);
|
const float image_width, const float image_height);
|
||||||
|
@ -133,7 +133,7 @@ static void gfx_widget_achievement_popup_frame(void* data, void* userdata)
|
|||||||
|
|
||||||
int scissor_me_timbers = 0;
|
int scissor_me_timbers = 0;
|
||||||
|
|
||||||
gfx_display_set_alpha(gfx_widgets_get_backdrop_orig(), DEFAULT_BACKDROP);
|
gfx_display_set_alpha(p_dispwidget->backdrop_orig, DEFAULT_BACKDROP);
|
||||||
gfx_display_set_alpha(pure_white, 1.0f);
|
gfx_display_set_alpha(pure_white, 1.0f);
|
||||||
|
|
||||||
/* Default icon */
|
/* Default icon */
|
||||||
@ -146,7 +146,7 @@ static void gfx_widget_achievement_popup_frame(void* data, void* userdata)
|
|||||||
state->height,
|
state->height,
|
||||||
state->height,
|
state->height,
|
||||||
video_width, video_height,
|
video_width, video_height,
|
||||||
gfx_widgets_get_backdrop_orig());
|
p_dispwidget->backdrop_orig);
|
||||||
|
|
||||||
/* Icon */
|
/* Icon */
|
||||||
if (p_dispwidget->gfx_widgets_icons_textures[MENU_WIDGETS_ICON_ACHIEVEMENT])
|
if (p_dispwidget->gfx_widgets_icons_textures[MENU_WIDGETS_ICON_ACHIEVEMENT])
|
||||||
@ -209,7 +209,7 @@ static void gfx_widget_achievement_popup_frame(void* data, void* userdata)
|
|||||||
state->height,
|
state->height,
|
||||||
video_width,
|
video_width,
|
||||||
video_height,
|
video_height,
|
||||||
gfx_widgets_get_backdrop_orig());
|
p_dispwidget->backdrop_orig);
|
||||||
|
|
||||||
/* Title */
|
/* Title */
|
||||||
gfx_widgets_draw_text(&p_dispwidget->gfx_widget_fonts.regular,
|
gfx_widgets_draw_text(&p_dispwidget->gfx_widget_fonts.regular,
|
||||||
|
@ -113,7 +113,7 @@ static void gfx_widget_leaderboard_display_frame(void* data, void* userdata)
|
|||||||
unsigned x;
|
unsigned x;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
gfx_display_set_alpha(gfx_widgets_get_backdrop_orig(), DEFAULT_BACKDROP);
|
gfx_display_set_alpha(p_dispwidget->backdrop_orig, DEFAULT_BACKDROP);
|
||||||
gfx_display_set_alpha(pure_white, 1.0f);
|
gfx_display_set_alpha(pure_white, 1.0f);
|
||||||
|
|
||||||
for (i = 0; i < state->count; ++i)
|
for (i = 0; i < state->count; ++i)
|
||||||
@ -127,7 +127,7 @@ static void gfx_widget_leaderboard_display_frame(void* data, void* userdata)
|
|||||||
video_width, video_height,
|
video_width, video_height,
|
||||||
(int)x, (int)y, widget_width, widget_height,
|
(int)x, (int)y, widget_width, widget_height,
|
||||||
video_width, video_height,
|
video_width, video_height,
|
||||||
gfx_widgets_get_backdrop_orig());
|
p_dispwidget->backdrop_orig);
|
||||||
|
|
||||||
/* Text */
|
/* Text */
|
||||||
gfx_widgets_draw_text(&p_dispwidget->gfx_widget_fonts.regular,
|
gfx_widgets_draw_text(&p_dispwidget->gfx_widget_fonts.regular,
|
||||||
|
@ -351,7 +351,7 @@ static void gfx_widget_libretro_message_frame(void *data, void *user_data)
|
|||||||
|
|
||||||
gfx_widget_font_data_t *font_msg_queue = &p_dispwidget->gfx_widget_fonts.msg_queue;
|
gfx_widget_font_data_t *font_msg_queue = &p_dispwidget->gfx_widget_fonts.msg_queue;
|
||||||
size_t msg_queue_size = p_dispwidget->current_msgs_size;
|
size_t msg_queue_size = p_dispwidget->current_msgs_size;
|
||||||
float *bg_color = gfx_widgets_get_backdrop_orig();
|
float *bg_color = p_dispwidget->backdrop_orig;
|
||||||
float bg_alpha;
|
float bg_alpha;
|
||||||
float bg_y;
|
float bg_y;
|
||||||
|
|
||||||
|
@ -232,7 +232,7 @@ static void gfx_widget_progress_message_frame(void *data, void *user_data)
|
|||||||
unsigned video_height = video_info->height;
|
unsigned video_height = video_info->height;
|
||||||
void *userdata = video_info->userdata;
|
void *userdata = video_info->userdata;
|
||||||
|
|
||||||
float *backdrop_color = gfx_widgets_get_backdrop_orig();
|
float *backdrop_color = p_dispwidget->backdrop_orig;
|
||||||
unsigned text_color = COLOR_TEXT_ALPHA(0xFFFFFFFF, (unsigned)(state->alpha * 255.0f));
|
unsigned text_color = COLOR_TEXT_ALPHA(0xFFFFFFFF, (unsigned)(state->alpha * 255.0f));
|
||||||
|
|
||||||
gfx_widget_font_data_t *font_regular = &p_dispwidget->gfx_widget_fonts.regular;
|
gfx_widget_font_data_t *font_regular = &p_dispwidget->gfx_widget_fonts.regular;
|
||||||
|
@ -219,14 +219,14 @@ static void gfx_widget_screenshot_frame(void* data, void *user_data)
|
|||||||
char shotname[256];
|
char shotname[256];
|
||||||
gfx_animation_ctx_ticker_t ticker;
|
gfx_animation_ctx_ticker_t ticker;
|
||||||
|
|
||||||
gfx_display_set_alpha(gfx_widgets_get_backdrop_orig(), DEFAULT_BACKDROP);
|
gfx_display_set_alpha(p_dispwidget->backdrop_orig, DEFAULT_BACKDROP);
|
||||||
|
|
||||||
gfx_display_draw_quad(userdata,
|
gfx_display_draw_quad(userdata,
|
||||||
video_width, video_height,
|
video_width, video_height,
|
||||||
0, state->y,
|
0, state->y,
|
||||||
state->width, state->height,
|
state->width, state->height,
|
||||||
video_width, video_height,
|
video_width, video_height,
|
||||||
gfx_widgets_get_backdrop_orig()
|
p_dispwidget->backdrop_orig
|
||||||
);
|
);
|
||||||
|
|
||||||
gfx_display_set_alpha(pure_white, 1.0f);
|
gfx_display_set_alpha(pure_white, 1.0f);
|
||||||
|
@ -110,7 +110,7 @@ static void gfx_widget_volume_frame(void* data, void *user_data)
|
|||||||
|
|
||||||
unsigned padding = p_dispwidget->simple_widget_padding;
|
unsigned padding = p_dispwidget->simple_widget_padding;
|
||||||
|
|
||||||
float* backdrop_orig = gfx_widgets_get_backdrop_orig();
|
float* backdrop_orig = p_dispwidget->backdrop_orig;
|
||||||
|
|
||||||
uintptr_t volume_icon = 0;
|
uintptr_t volume_icon = 0;
|
||||||
unsigned icon_size = state->textures[ICON_MED] ? state->widget_height : padding;
|
unsigned icon_size = state->textures[ICON_MED] ? state->widget_height : padding;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user