summaryrefslogtreecommitdiff
path: root/apps/gui/pitchscreen.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/gui/pitchscreen.c')
-rw-r--r--apps/gui/pitchscreen.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/apps/gui/pitchscreen.c b/apps/gui/pitchscreen.c
index 0d31193fa6..b5b719ef02 100644
--- a/apps/gui/pitchscreen.c
+++ b/apps/gui/pitchscreen.c
@@ -239,6 +239,7 @@ static void pitchscreen_draw(struct screen *display, int max_lines,
239 char buf[32]; 239 char buf[32];
240 int w, h; 240 int w, h;
241 bool show_lang_pitch; 241 bool show_lang_pitch;
242 struct viewport *last_vp = NULL;
242 243
243 /* "Pitch up/Pitch down" - hide for a small screen, 244 /* "Pitch up/Pitch down" - hide for a small screen,
244 * the text is drawn centered automatically 245 * the text is drawn centered automatically
@@ -249,7 +250,7 @@ static void pitchscreen_draw(struct screen *display, int max_lines,
249 { 250 {
250 int w, h; 251 int w, h;
251 struct viewport *vp = &pitch_viewports[PITCH_TOP]; 252 struct viewport *vp = &pitch_viewports[PITCH_TOP];
252 display->set_viewport(vp); 253 last_vp = display->set_viewport(vp);
253 display->clear_viewport(); 254 display->clear_viewport();
254#ifdef HAVE_TOUCHSCREEN 255#ifdef HAVE_TOUCHSCREEN
255 /* two arrows in the top row, left and right column */ 256 /* two arrows in the top row, left and right column */
@@ -405,7 +406,7 @@ static void pitchscreen_draw(struct screen *display, int max_lines,
405 rightlabel); 406 rightlabel);
406 } 407 }
407 display->update_viewport(); 408 display->update_viewport();
408 display->set_viewport(NULL); 409 display->set_viewport(last_vp);
409} 410}
410 411
411static int32_t pitch_increase(int32_t pitch, int32_t pitch_delta, bool allow_cutoff 412static int32_t pitch_increase(int32_t pitch, int32_t pitch_delta, bool allow_cutoff