diff options
author | Karl Kurbjun <kkurbjun@gmail.com> | 2009-11-07 18:48:35 +0000 |
---|---|---|
committer | Karl Kurbjun <kkurbjun@gmail.com> | 2009-11-07 18:48:35 +0000 |
commit | dcc52f581cdd503e37f78fe917532b759077845f (patch) | |
tree | 8e2ee9d18ae8387dd4b96441fa27b25440a6a999 | |
parent | 765ff0130ab58c67e82a2ed17c64c577c6434d57 (diff) | |
download | rockbox-dcc52f581cdd503e37f78fe917532b759077845f.tar.gz rockbox-dcc52f581cdd503e37f78fe917532b759077845f.zip |
Fix two width calculations
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23552 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r-- | firmware/drivers/lcd-1bit-vert.c | 3 | ||||
-rw-r--r-- | firmware/drivers/lcd-2bit-vi.c | 3 |
2 files changed, 2 insertions, 4 deletions
diff --git a/firmware/drivers/lcd-1bit-vert.c b/firmware/drivers/lcd-1bit-vert.c index ae7cddb19a..051861616f 100644 --- a/firmware/drivers/lcd-1bit-vert.c +++ b/firmware/drivers/lcd-1bit-vert.c | |||
@@ -404,11 +404,10 @@ void LCDFN(hline)(int x1, int x2, int y) | |||
404 | 404 | ||
405 | /* adjust to viewport */ | 405 | /* adjust to viewport */ |
406 | x1 += current_vp->x; | 406 | x1 += current_vp->x; |
407 | x2 += current_vp->x; | ||
407 | y += current_vp->y; | 408 | y += current_vp->y; |
408 | 409 | ||
409 | #if defined(HAVE_VIEWPORT_CLIP) | 410 | #if defined(HAVE_VIEWPORT_CLIP) |
410 | x2 += current_vp->x; | ||
411 | |||
412 | /********************* Viewport on screen clipping ********************/ | 411 | /********************* Viewport on screen clipping ********************/ |
413 | /* nothing to draw? */ | 412 | /* nothing to draw? */ |
414 | if (((unsigned)y >= (unsigned) LCDM(HEIGHT)) || (x1 >= LCDM(WIDTH)) | 413 | if (((unsigned)y >= (unsigned) LCDM(HEIGHT)) || (x1 >= LCDM(WIDTH)) |
diff --git a/firmware/drivers/lcd-2bit-vi.c b/firmware/drivers/lcd-2bit-vi.c index 5edb588ce0..853cd88f54 100644 --- a/firmware/drivers/lcd-2bit-vi.c +++ b/firmware/drivers/lcd-2bit-vi.c | |||
@@ -594,11 +594,10 @@ void LCDFN(hline)(int x1, int x2, int y) | |||
594 | 594 | ||
595 | /* adjust x1 and y to viewport */ | 595 | /* adjust x1 and y to viewport */ |
596 | x1 += current_vp->x; | 596 | x1 += current_vp->x; |
597 | x2 += current_vp->x; | ||
597 | y += current_vp->y; | 598 | y += current_vp->y; |
598 | 599 | ||
599 | #if defined(HAVE_VIEWPORT_CLIP) | 600 | #if defined(HAVE_VIEWPORT_CLIP) |
600 | x2 += current_vp->x; | ||
601 | |||
602 | /********************* Viewport on screen clipping ********************/ | 601 | /********************* Viewport on screen clipping ********************/ |
603 | /* nothing to draw? */ | 602 | /* nothing to draw? */ |
604 | if (((unsigned)y >= (unsigned) LCDM(HEIGHT)) || (x1 >= LCDM(WIDTH)) | 603 | if (((unsigned)y >= (unsigned) LCDM(HEIGHT)) || (x1 >= LCDM(WIDTH)) |