diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2011-07-10 18:54:54 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2011-07-10 18:54:54 +0000 |
commit | 33d6714215d70933d95c82a8396ceafde0c20ffe (patch) | |
tree | 3ed06182fbddb2cb7bb9faee058e2eb814c2fb48 /apps/examples/nxtext | |
parent | 4b40e8314b015f07618e88b7c5e7c00b55679a82 (diff) | |
download | px4-nuttx-33d6714215d70933d95c82a8396ceafde0c20ffe.tar.gz px4-nuttx-33d6714215d70933d95c82a8396ceafde0c20ffe.tar.bz2 px4-nuttx-33d6714215d70933d95c82a8396ceafde0c20ffe.zip |
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
Diffstat (limited to 'apps/examples/nxtext')
-rw-r--r-- | apps/examples/nxtext/nxtext_bkgd.c | 6 |
1 files changed, 6 insertions, 0 deletions
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) { |