[vulkan] Clamp the conback lines to the texture height

Fixes the bad background (with deadbeef scrap)
This commit is contained in:
Bill Currie 2021-01-24 00:54:26 +09:00
parent ada4f37b9d
commit af5415010a

View file

@ -613,6 +613,7 @@ Vulkan_Draw_ConsoleBackground (int lines, byte alpha, vulkan_ctx_t *ctx)
qpic_t *cpic;
cpic = Vulkan_Draw_CachePic ("gfx/conback.lmp", false, ctx);
int ofs = max (0, cpic->height - lines);
lines = min (lines, cpic->height);
draw_pic (0, 0, vid.conwidth, lines, cpic,
0, ofs, cpic->width, lines, color, frame);
}