From f2a20b0478ff5d936f977f781a565ff0804705fe Mon Sep 17 00:00:00 2001 From: TC1995 Date: Mon, 21 Jun 2021 17:06:45 +0200 Subject: [PATCH] Correct src_y/x on the tgui9440 bresenham command once again. --- src/video/vid_tgui9440.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/video/vid_tgui9440.c b/src/video/vid_tgui9440.c index 75ad52f3e..b0ea328f2 100644 --- a/src/video/vid_tgui9440.c +++ b/src/video/vid_tgui9440.c @@ -1472,7 +1472,7 @@ tgui_accel_command(int count, uint32_t cpu_dat, tgui_t *tgui) case TGUI_BRESENHAMLINE: { if (count == -1) { - tgui->accel.cx = tgui->accel.src_x - tgui->accel.src_y; + tgui->accel.cx = tgui->accel.src_y - tgui->accel.src_x; tgui->accel.cy = tgui->accel.src_y; tgui->accel.dx = tgui->accel.dst_x; tgui->accel.dy = tgui->accel.dst_y; @@ -1497,7 +1497,7 @@ tgui_accel_command(int count, uint32_t cpu_dat, tgui_t *tgui) } else { tgui->accel.dy += ydir; } - tgui->accel.err_term += (tgui->accel.src_x - tgui->accel.src_y); + tgui->accel.err_term += (tgui->accel.src_y - tgui->accel.src_x); } else { tgui->accel.err_term += tgui->accel.src_y; }