changeset 448:e56e74e8b730

R2D C139 C-Sample emulation: fixed off-by-one error that was causing the garbage in the upper left corner of the display and also caused everything to be shifted by one pixel
author Mychaela Falconia <falcon@freecalypso.org>
date Mon, 29 Jan 2018 06:24:55 +0000
parents 4b6acb68b851
children 3bf62c0a7f34
files src/cs/drivers/drv_app/r2d/lcds/c139/r2d_task_i.c
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/cs/drivers/drv_app/r2d/lcds/c139/r2d_task_i.c	Sun Jan 28 21:12:22 2018 +0000
+++ b/src/cs/drivers/drv_app/r2d/lcds/c139/r2d_task_i.c	Mon Jan 29 06:24:55 2018 +0000
@@ -45,8 +45,8 @@
 	UINT16 yword, ybit;
 
 	/* mirroring */
-	x = R2D_WIDTH - x;
-	y = R2D_HEIGHT - y;
+	x = R2D_WIDTH - 1 - x;
+	y = R2D_HEIGHT - 1 - y;
 	yword = y >> 5;
 	ybit = y & 31;
 	p = fb + x * R2D_MWHEIGHT + yword;