From: Laurent Mazet Date: Thu, 3 Oct 2024 22:51:40 +0000 (+0200) Subject: fix refresh X-Git-Tag: v2.0~10 X-Git-Url: https://secure.softndesign.org/git/?a=commitdiff_plain;h=ddb299d1d5580244608bfd38fff897df09c67e0d;p=display.git fix refresh --- diff --git a/ndisplay.c b/ndisplay.c index b45053d..97a099a 100644 --- a/ndisplay.c +++ b/ndisplay.c @@ -154,8 +154,8 @@ int main (int argc, char *argv[]) int height = min (image->height - ycursor, LINES); VERBOSE (DEBUG, FILE *fd = fopen ("my.log", "a"); fprintf (fd, "(%d, %d)\n", width, height); fclose (fd)); int x, y; - for (y = 0; y < height; y++) { - for (x = 0; x < width; x++) { + for (x = 0; x < width; x++) { + for (y = 0; y < height; y++) { int ind = (x + xcursor) + image->width * (y + ycursor); color_t *color = findcolor (correction (image->red[ind], gf[0]), @@ -174,10 +174,9 @@ int main (int argc, char *argv[]) add_wch (&cchar); } } - refresh (); } - refresh (); - attron (COLOR_PAIR (0)); + attron (COLOR_PAIR(0)); + redrawwin (stdscr); switch (getch ()) { case KEY_UP: