mirror of
https://github.com/apache/nuttx-apps.git
synced 2026-08-07 13:37:21 +00:00
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:
parent
e8ca12ee30
commit
189716cd84
1 changed files with 6 additions and 0 deletions
|
|
@ -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)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue