diff options
Diffstat (limited to 'apps/plugins/lib/grey_scroll.c')
-rw-r--r-- | apps/plugins/lib/grey_scroll.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/apps/plugins/lib/grey_scroll.c b/apps/plugins/lib/grey_scroll.c index adecd3bc43..35f73b70c4 100644 --- a/apps/plugins/lib/grey_scroll.c +++ b/apps/plugins/lib/grey_scroll.c | |||
@@ -37,7 +37,10 @@ void grey_scroll_left(int count) | |||
37 | int length, blank; | 37 | int length, blank; |
38 | 38 | ||
39 | if ((unsigned)count >= (unsigned)_grey_info.width) | 39 | if ((unsigned)count >= (unsigned)_grey_info.width) |
40 | { | ||
41 | grey_clear_display(); | ||
40 | return; | 42 | return; |
43 | } | ||
41 | 44 | ||
42 | data = _grey_info.buffer; | 45 | data = _grey_info.buffer; |
43 | data_end = data + _GREY_MULUQ(_grey_info.width, _grey_info.height); | 46 | data_end = data + _GREY_MULUQ(_grey_info.width, _grey_info.height); |
@@ -62,7 +65,10 @@ void grey_scroll_right(int count) | |||
62 | int length, blank; | 65 | int length, blank; |
63 | 66 | ||
64 | if ((unsigned)count >= (unsigned)_grey_info.width) | 67 | if ((unsigned)count >= (unsigned)_grey_info.width) |
68 | { | ||
69 | grey_clear_display(); | ||
65 | return; | 70 | return; |
71 | } | ||
66 | 72 | ||
67 | data = _grey_info.buffer; | 73 | data = _grey_info.buffer; |
68 | data_end = data + _GREY_MULUQ(_grey_info.width, _grey_info.height); | 74 | data_end = data + _GREY_MULUQ(_grey_info.width, _grey_info.height); |
@@ -86,7 +92,10 @@ void grey_scroll_up(int count) | |||
86 | int blank; | 92 | int blank; |
87 | 93 | ||
88 | if ((unsigned)count >= (unsigned)_grey_info.height) | 94 | if ((unsigned)count >= (unsigned)_grey_info.height) |
95 | { | ||
96 | grey_clear_display(); | ||
89 | return; | 97 | return; |
98 | } | ||
90 | 99 | ||
91 | shift = _GREY_MULUQ(_grey_info.width, count); | 100 | shift = _GREY_MULUQ(_grey_info.width, count); |
92 | length = _GREY_MULUQ(_grey_info.width, _grey_info.height - count); | 101 | length = _GREY_MULUQ(_grey_info.width, _grey_info.height - count); |
@@ -105,7 +114,10 @@ void grey_scroll_down(int count) | |||
105 | int blank; | 114 | int blank; |
106 | 115 | ||
107 | if ((unsigned)count >= (unsigned)_grey_info.height) | 116 | if ((unsigned)count >= (unsigned)_grey_info.height) |
117 | { | ||
118 | grey_clear_display(); | ||
108 | return; | 119 | return; |
120 | } | ||
109 | 121 | ||
110 | shift = _GREY_MULUQ(_grey_info.width, count); | 122 | shift = _GREY_MULUQ(_grey_info.width, count); |
111 | length = _GREY_MULUQ(_grey_info.width, _grey_info.height - count); | 123 | length = _GREY_MULUQ(_grey_info.width, _grey_info.height - count); |
@@ -126,7 +138,10 @@ void grey_ub_scroll_left(int count) | |||
126 | int blank, length; | 138 | int blank, length; |
127 | 139 | ||
128 | if ((unsigned)count >= (unsigned)_grey_info.width) | 140 | if ((unsigned)count >= (unsigned)_grey_info.width) |
141 | { | ||
142 | grey_ub_clear_display(); | ||
129 | return; | 143 | return; |
144 | } | ||
130 | 145 | ||
131 | data = _grey_info.values; | 146 | data = _grey_info.values; |
132 | data_end = data + _GREY_MULUQ(_grey_info.width, _grey_info.height); | 147 | data_end = data + _GREY_MULUQ(_grey_info.width, _grey_info.height); |
@@ -156,7 +171,10 @@ void grey_ub_scroll_right(int count) | |||
156 | int blank, length; | 171 | int blank, length; |
157 | 172 | ||
158 | if ((unsigned)count >= (unsigned)_grey_info.width) | 173 | if ((unsigned)count >= (unsigned)_grey_info.width) |
174 | { | ||
175 | grey_ub_clear_display(); | ||
159 | return; | 176 | return; |
177 | } | ||
160 | 178 | ||
161 | data = _grey_info.values; | 179 | data = _grey_info.values; |
162 | data_end = data + _GREY_MULUQ(_grey_info.width, _grey_info.height); | 180 | data_end = data + _GREY_MULUQ(_grey_info.width, _grey_info.height); |
@@ -185,7 +203,10 @@ void grey_ub_scroll_up(int count) | |||
185 | int blank; | 203 | int blank; |
186 | 204 | ||
187 | if ((unsigned)count >= (unsigned)_grey_info.height) | 205 | if ((unsigned)count >= (unsigned)_grey_info.height) |
206 | { | ||
207 | grey_ub_clear_display(); | ||
188 | return; | 208 | return; |
209 | } | ||
189 | 210 | ||
190 | dst = _grey_info.values; | 211 | dst = _grey_info.values; |
191 | end = dst + _GREY_MULUQ(_grey_info.height, _grey_info.width); | 212 | end = dst + _GREY_MULUQ(_grey_info.height, _grey_info.width); |
@@ -257,7 +278,10 @@ void grey_ub_scroll_down(int count) | |||
257 | int blank; | 278 | int blank; |
258 | 279 | ||
259 | if ((unsigned)count >= (unsigned)_grey_info.height) | 280 | if ((unsigned)count >= (unsigned)_grey_info.height) |
281 | { | ||
282 | grey_ub_clear_display(); | ||
260 | return; | 283 | return; |
284 | } | ||
261 | 285 | ||
262 | start = _grey_info.values; | 286 | start = _grey_info.values; |
263 | dst = start + _GREY_MULUQ(_grey_info.height, _grey_info.width); | 287 | dst = start + _GREY_MULUQ(_grey_info.height, _grey_info.width); |