FreeCalypso > hg > fc-magnetite
comparison src/cs/drivers/drv_app/r2d/lcds/c139/r2d_task_i.c @ 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 | 384fbd61c252 |
children |
comparison
equal
deleted
inserted
replaced
447:4b6acb68b851 | 448:e56e74e8b730 |
---|---|
43 { | 43 { |
44 UINT32 *p, mask; | 44 UINT32 *p, mask; |
45 UINT16 yword, ybit; | 45 UINT16 yword, ybit; |
46 | 46 |
47 /* mirroring */ | 47 /* mirroring */ |
48 x = R2D_WIDTH - x; | 48 x = R2D_WIDTH - 1 - x; |
49 y = R2D_HEIGHT - y; | 49 y = R2D_HEIGHT - 1 - y; |
50 yword = y >> 5; | 50 yword = y >> 5; |
51 ybit = y & 31; | 51 ybit = y & 31; |
52 p = fb + x * R2D_MWHEIGHT + yword; | 52 p = fb + x * R2D_MWHEIGHT + yword; |
53 mask = 1 << ybit; | 53 mask = 1 << ybit; |
54 if (*p & mask) | 54 if (*p & mask) |