Fix another off by one for drawLine

This commit is contained in:
CasualPokePlayer 2024-05-25 13:36:15 -07:00
parent 51dac42195
commit 766da10a1d
1 changed files with 10 additions and 0 deletions

View File

@ -448,6 +448,16 @@ namespace BizHawk.Bizware.Graphics
public void DrawLine(Color color, int x1, int y1, int x2, int y2)
{
if (x1 > x2)
{
(x2, x1) = (x1, x2);
}
if (y1 > y2)
{
(y2, y1) = (y1, y2);
}
_imGuiDrawList.AddLine(
p1: new(x1, y1),
p2: new(x2, y2 + 0.5f),