From 33d6714215d70933d95c82a8396ceafde0c20ffe Mon Sep 17 00:00:00 2001 From: patacongo Date: Sun, 10 Jul 2011 18:54:54 +0000 Subject: Fix an error in the NX move logic git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3766 42af7a65-404d-4744-a932-0658087f49c3 --- apps/examples/nxtext/nxtext_bkgd.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'apps/examples') diff --git a/apps/examples/nxtext/nxtext_bkgd.c b/apps/examples/nxtext/nxtext_bkgd.c index 6bc7a82cf..a2feefd24 100644 --- a/apps/examples/nxtext/nxtext_bkgd.c +++ b/apps/examples/nxtext/nxtext_bkgd.c @@ -252,6 +252,8 @@ static inline void nxbg_scroll(NXWINDOW hwnd, int lineheight) /* Move the display in the range of 0-height up one lineheight. The * line at the bottom will be reset to the background color automatically. + * + * The source rectangle to be moved. */ rect.pt1.x = 0; @@ -259,9 +261,13 @@ static inline void nxbg_scroll(NXWINDOW hwnd, int lineheight) rect.pt2.x = g_bgstate.wsize.w - 1; rect.pt2.y = g_bgstate.wsize.h - 1; + /* The offset that determines how far to move the source rectangle */ + offset.x = 0; offset.y = -lineheight; + /* Move the source rectangle */ + ret = nx_move(hwnd, &rect, &offset); if (ret < 0) { -- cgit v1.2.3