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
This commit is contained in:
patacongo 2011-07-10 18:54:54 +00:00
parent e8ca12ee30
commit 189716cd84

View File

@ -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)
{