apps/graphics/pdcurses: Fix some display update calculations.
This commit is contained in:
parent
1fbf30e6fe
commit
9246d03ebd
@ -610,8 +610,15 @@ int worm_main(int argc, char *argv[])
|
|||||||
{
|
{
|
||||||
const struct options *op;
|
const struct options *op;
|
||||||
struct worm *w;
|
struct worm *w;
|
||||||
short **ref, *ip;
|
short **ref;
|
||||||
int x, y, n, h, last, bottom, seed;
|
short *ip;
|
||||||
|
int x;
|
||||||
|
int y;
|
||||||
|
int n;
|
||||||
|
int h;
|
||||||
|
int last;
|
||||||
|
int bottom;
|
||||||
|
int seed;
|
||||||
|
|
||||||
for (x = 1; x < argc; x++)
|
for (x = 1; x < argc; x++)
|
||||||
{
|
{
|
||||||
@ -683,7 +690,7 @@ int worm_main(int argc, char *argv[])
|
|||||||
curs_set(0);
|
curs_set(0);
|
||||||
|
|
||||||
bottom = LINES - 1;
|
bottom = LINES - 1;
|
||||||
last = COLS - 1;
|
last = COLS - 1;
|
||||||
|
|
||||||
#ifdef A_COLOR
|
#ifdef A_COLOR
|
||||||
if (has_colors())
|
if (has_colors())
|
||||||
|
@ -419,8 +419,8 @@ static void PDC_update(FAR struct pdc_fbstate_s *fbstate, int row, int col,
|
|||||||
{
|
{
|
||||||
/* Setup the bounding rectangle */
|
/* Setup the bounding rectangle */
|
||||||
|
|
||||||
rect.pt1.x = PDC_pixel_x(FAR fbstate, col);
|
rect.pt1.x = PDC_pixel_x(fbstate, col) + fbstate->hoffset;
|
||||||
rect.pt1.y = PDC_pixel_x(FAR fbstate, row);
|
rect.pt1.y = PDC_pixel_y(fbstate, row) + fbstate->voffset;
|
||||||
rect.pt2.x = rect.pt1.x + nchars * fbstate->fwidth - 1;
|
rect.pt2.x = rect.pt1.x + nchars * fbstate->fwidth - 1;
|
||||||
rect.pt2.y = rect.pt1.y + fbstate->fheight - 1;
|
rect.pt2.y = rect.pt1.y + fbstate->fheight - 1;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user