diff options
author | Aidan MacDonald <amachronic@protonmail.com> | 2022-09-26 15:20:00 +0100 |
---|---|---|
committer | Aidan MacDonald <amachronic@protonmail.com> | 2022-10-09 22:07:48 +0100 |
commit | eaccdeeae2ff57efe1859ba80b7558b328e16a10 (patch) | |
tree | f275d5695b28037b26170d2c085ed177bd6f83d3 /firmware/drivers/lcd-scroll.c | |
parent | 4f9e4ddb9914ff73259f006a4cbcf520656f06e0 (diff) | |
download | rockbox-eaccdeeae2ff57efe1859ba80b7558b328e16a10.tar.gz rockbox-eaccdeeae2ff57efe1859ba80b7558b328e16a10.zip |
lcd: Remove internal function get_viewport()
Only the scroll engine calls this, but it's easily replaced
by the return value of set_viewport_ex().
Change-Id: I2e2c8234f969bc07c9ff7d864e58551115175e26
Diffstat (limited to 'firmware/drivers/lcd-scroll.c')
-rw-r--r-- | firmware/drivers/lcd-scroll.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/firmware/drivers/lcd-scroll.c b/firmware/drivers/lcd-scroll.c index d8bfd72dde..dfdf78ecda 100644 --- a/firmware/drivers/lcd-scroll.c +++ b/firmware/drivers/lcd-scroll.c | |||
@@ -185,10 +185,9 @@ static void LCDFN(scroll_worker)(void) | |||
185 | { | 185 | { |
186 | int index; | 186 | int index; |
187 | bool makedelay; | 187 | bool makedelay; |
188 | bool is_default; | ||
189 | struct scroll_screen_info *si = &LCDFN(scroll_info); | 188 | struct scroll_screen_info *si = &LCDFN(scroll_info); |
190 | struct scrollinfo *s; | 189 | struct scrollinfo *s; |
191 | struct viewport *vp; | 190 | struct viewport *oldvp; |
192 | int step; | 191 | int step; |
193 | 192 | ||
194 | for ( index = 0; index < si->lines; index++ ) | 193 | for ( index = 0; index < si->lines; index++ ) |
@@ -206,8 +205,7 @@ static void LCDFN(scroll_worker)(void) | |||
206 | * is unaware of the swapped viewports. the vp must | 205 | * is unaware of the swapped viewports. the vp must |
207 | * be switched early so that lcd_getstringsize() picks the | 206 | * be switched early so that lcd_getstringsize() picks the |
208 | * correct font */ | 207 | * correct font */ |
209 | vp = LCDFN(get_viewport)(&is_default); | 208 | oldvp = LCDFN(set_viewport_ex)(s->vp, 0); /* don't mark the last vp as dirty */ |
210 | LCDFN(set_viewport_ex)(s->vp, 0); /* don't mark the last vp as dirty */ | ||
211 | 209 | ||
212 | makedelay = false; | 210 | makedelay = false; |
213 | step = si->step; | 211 | step = si->step; |
@@ -220,7 +218,7 @@ static void LCDFN(scroll_worker)(void) | |||
220 | /* put the line onto the display now */ | 218 | /* put the line onto the display now */ |
221 | makedelay = LCDFN(scroll_now(s)); | 219 | makedelay = LCDFN(scroll_now(s)); |
222 | 220 | ||
223 | LCDFN(set_viewport_ex)(vp, 0); /* don't mark the last vp as dirty */ | 221 | LCDFN(set_viewport_ex)(oldvp, 0); /* don't mark the last vp as dirty */ |
224 | 222 | ||
225 | if (makedelay) | 223 | if (makedelay) |
226 | s->start_tick += si->delay + si->ticks; | 224 | s->start_tick += si->delay + si->ticks; |