fbaccel: fix h/v line length for unaccelerated FB

This commit is contained in:
Stefan Seyfried
2013-05-27 00:49:35 +02:00
parent 999dd041c1
commit 69c9702f37

View File

@@ -447,9 +447,10 @@ void CFbAccel::paintLine(int xa, int ya, int xb, int yb, const fb_pixel_t col)
#else #else
int dx = abs (xa - xb); int dx = abs (xa - xb);
int dy = abs (ya - yb); int dy = abs (ya - yb);
#if HAVE_SPARK_HARDWARE
if (dy == 0) /* horizontal line */ if (dy == 0) /* horizontal line */
{ {
/* paintRect actually is 1 pixel short to the right,
* but that's bug-compatibility with the GXA code */
paintRect(xa, ya, xb - xa, 1, col); paintRect(xa, ya, xb - xa, 1, col);
return; return;
} }
@@ -458,7 +459,6 @@ void CFbAccel::paintLine(int xa, int ya, int xb, int yb, const fb_pixel_t col)
paintRect(xa, ya, 1, yb - ya, col); paintRect(xa, ya, 1, yb - ya, col);
return; return;
} }
#endif
int x; int x;
int y; int y;
int End; int End;