Cleanup some references to gfx_display_white_texture and

don't assume NULL == 0 for uintptr_t
This commit is contained in:
twinaphex 2021-09-13 19:07:09 +02:00
parent 3c69a941da
commit fc4d4c53cd
2 changed files with 2 additions and 3 deletions

View File

@ -558,7 +558,7 @@ void gfx_display_draw_quad(
draw.height = h;
draw.coords = &coords;
draw.matrix_data = NULL;
draw.texture = (texture != NULL) ? *texture : gfx_display_white_texture;
draw.texture = (texture != 0) ? *texture : gfx_display_white_texture;
draw.prim_type = GFX_DISPLAY_PRIM_TRIANGLESTRIP;
draw.pipeline_id = 0;
draw.scale_factor = 1.0f;

View File

@ -5244,6 +5244,7 @@ static void materialui_render_background(
draw.pipeline_active = false;
draw.backend_data = NULL;
draw.color = draw_color;
draw.texture = 0;
if (mui->textures.bg && !libretro_running)
{
@ -5256,8 +5257,6 @@ static void materialui_render_background(
}
else
{
draw.texture = gfx_display_white_texture;
/* Copy 'list_background' colour to draw colour */
memcpy(draw_color, mui->colors.list_background, sizeof(draw_color));