mirror of
https://github.com/libretro/RetroArch
synced 2025-03-03 04:14:00 +00:00
Get rid of some implicit memsets for font_params local variables
This commit is contained in:
parent
a23598e553
commit
c4d1f2c49d
@ -231,8 +231,8 @@ static void mui_blit_line(float x, float y, unsigned width, unsigned height,
|
||||
const char *message, uint32_t color, enum text_alignment text_align)
|
||||
{
|
||||
int font_size;
|
||||
struct font_params params;
|
||||
void *fb_buf = NULL;
|
||||
struct font_params params = {0};
|
||||
menu_handle_t *menu = menu_driver_get_ptr();
|
||||
|
||||
if (!menu)
|
||||
@ -242,7 +242,10 @@ static void mui_blit_line(float x, float y, unsigned width, unsigned height,
|
||||
|
||||
params.x = x / width;
|
||||
params.y = 1.0f - (y + font_size / 3) / height;
|
||||
params.scale = 1.0;
|
||||
params.scale = 1.0f;
|
||||
params.drop_mod = 0.0f;
|
||||
params.drop_x = 0.0f;
|
||||
params.drop_y = 0.0f;
|
||||
params.color = color;
|
||||
params.full_screen = true;
|
||||
params.text_align = text_align;
|
||||
|
@ -124,7 +124,7 @@ static void rmenu_render(void)
|
||||
bool msg_force;
|
||||
uint64_t *frame_count;
|
||||
size_t begin, end, i, j, selection;
|
||||
struct font_params font_parms = {0};
|
||||
struct font_params font_parms;
|
||||
char title[256] = {0};
|
||||
char title_buf[256] = {0};
|
||||
char title_msg[64] = {0};
|
||||
@ -171,11 +171,14 @@ static void rmenu_render(void)
|
||||
menu_animation_ticker_str(title_buf, RMENU_TERM_WIDTH,
|
||||
*frame_count / 15, title, true);
|
||||
|
||||
font_parms.x = POSITION_EDGE_MIN + POSITION_OFFSET;
|
||||
font_parms.y = POSITION_EDGE_MIN + POSITION_RENDER_OFFSET
|
||||
font_parms.x = POSITION_EDGE_MIN + POSITION_OFFSET;
|
||||
font_parms.y = POSITION_EDGE_MIN + POSITION_RENDER_OFFSET
|
||||
- (POSITION_OFFSET*2);
|
||||
font_parms.scale = FONT_SIZE_NORMAL;
|
||||
font_parms.color = WHITE;
|
||||
font_parms.scale = FONT_SIZE_NORMAL;
|
||||
font_parms.color = WHITE;
|
||||
font_parms.drop_mod = 0.0f;
|
||||
font_parms.drop_x = 0.0f;
|
||||
font_parms.drop_y = 0.0f;
|
||||
|
||||
video_driver_set_osd_msg(title_buf, &font_parms, NULL);
|
||||
|
||||
|
@ -429,8 +429,8 @@ static void xmb_draw_text(menu_handle_t *menu,
|
||||
enum text_alignment text_align,
|
||||
unsigned width, unsigned height)
|
||||
{
|
||||
struct font_params params;
|
||||
uint8_t a8 = 0;
|
||||
struct font_params params = {0};
|
||||
void *disp_buf = NULL;
|
||||
|
||||
if (alpha > xmb->alpha)
|
||||
@ -447,8 +447,10 @@ static void xmb_draw_text(menu_handle_t *menu,
|
||||
|
||||
params.x = x / width;
|
||||
params.y = 1.0f - y / height;
|
||||
|
||||
params.scale = scale_factor;
|
||||
params.drop_mod = 0.0f;
|
||||
params.drop_x = 0.0f;
|
||||
params.drop_y = 0.0f;
|
||||
params.color = FONT_COLOR_RGBA(255, 255, 255, a8);
|
||||
params.full_screen = true;
|
||||
params.text_align = text_align;
|
||||
@ -1346,12 +1348,12 @@ static void xmb_draw_items(xmb_handle_t *xmb,
|
||||
|
||||
for (; i < end; i++)
|
||||
{
|
||||
menu_entry_t entry;
|
||||
char name[PATH_MAX_LENGTH];
|
||||
char value[PATH_MAX_LENGTH];
|
||||
float icon_x, icon_y;
|
||||
|
||||
const float half_size = xmb->icon.size / 2.0f;
|
||||
menu_entry_t entry = {{0}};
|
||||
uintptr_t texture_switch = 0;
|
||||
uintptr_t icon = 0;
|
||||
xmb_node_t * node = (xmb_node_t*)menu_entries_get_userdata_at_offset(list, i);
|
||||
@ -1359,9 +1361,6 @@ static void xmb_draw_items(xmb_handle_t *xmb,
|
||||
uint32_t hash_value = 0;
|
||||
bool do_draw_text = false;
|
||||
|
||||
*entry.path = *entry.label = *entry.value = 0;
|
||||
entry.idx = entry.spacing = entry.type = 0;
|
||||
|
||||
if (!node)
|
||||
continue;
|
||||
|
||||
|
@ -312,13 +312,16 @@ static unsigned zarch_zui_hash(zui_t *zui, const char *s)
|
||||
|
||||
static void zarch_zui_draw_text(zui_t *zui, uint32_t color, int x, int y, const char *text)
|
||||
{
|
||||
struct font_params params = {0};
|
||||
struct font_params params;
|
||||
|
||||
/* need to use height-y because the font renderer
|
||||
* uses a different model-view-projection (MVP). */
|
||||
params.x = x / (float)zui->width;
|
||||
params.y = (zui->height - y) / (float)zui->height;
|
||||
params.scale = 1.0;
|
||||
params.scale = 1.0f;
|
||||
params.drop_mod = 0.0f;
|
||||
params.drop_x = 0.0f;
|
||||
params.drop_y = 0.0f;
|
||||
params.color = color;
|
||||
params.full_screen = true;
|
||||
params.text_align = TEXT_ALIGN_LEFT;
|
||||
|
Loading…
x
Reference in New Issue
Block a user