This commit is contained in:
twinaphex 2020-10-02 14:33:35 +02:00
parent 4adfaa07fc
commit 0bfbf81b49
1 changed files with 35 additions and 36 deletions

View File

@ -744,17 +744,17 @@ void gfx_display_draw_polygon(
unsigned width, unsigned height,
float *color)
{
float vertex[8];
gfx_display_ctx_draw_t draw;
struct video_coords coords;
gfx_display_t *p_disp = disp_get_ptr();
gfx_display_ctx_driver_t *dispctx = p_disp->dispctx;
if (width == 0 || height == 0)
return;
if (!dispctx)
return;
if (dispctx)
{
float vertex[8];
gfx_display_ctx_draw_t draw;
struct video_coords coords;
vertex[0] = x1 / (float)width;
vertex[1] = y1 / (float)height;
vertex[2] = x2 / (float)width;
@ -788,7 +788,6 @@ void gfx_display_draw_polygon(
dispctx->draw(&draw, userdata, video_width, video_height);
if (dispctx->blend_end)
dispctx->blend_end(userdata);
}
}
static void gfx_display_draw_texture(