summaryrefslogtreecommitdiff
path: root/apps/plugins/oscilloscope.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/plugins/oscilloscope.c')
-rw-r--r--apps/plugins/oscilloscope.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/apps/plugins/oscilloscope.c b/apps/plugins/oscilloscope.c
index d8bef0ae7f..62c11b91c9 100644
--- a/apps/plugins/oscilloscope.c
+++ b/apps/plugins/oscilloscope.c
@@ -838,10 +838,10 @@ static void osc_osd_show_message(int id, int val)
838 int width, height; 838 int width, height;
839 int maxwidth, maxheight; 839 int maxwidth, maxheight;
840 840
841 rb->lcd_set_viewport(osd_get_viewport()); 841 struct viewport *last_vp = rb->lcd_set_viewport(osd_get_viewport());
842 osd_get_max_dims(&maxwidth, &maxheight); 842 osd_get_max_dims(&maxwidth, &maxheight);
843 rb->lcd_getstringsize(osc_osd_message, &width, &height); 843 rb->lcd_getstringsize(osc_osd_message, &width, &height);
844 rb->lcd_set_viewport(NULL); /* to regular viewport */ 844 rb->lcd_set_viewport(last_vp); /* to regular viewport */
845 845
846 width += 2 + 2*OSC_OSD_MARGIN_SIZE; 846 width += 2 + 2*OSC_OSD_MARGIN_SIZE;
847 if (width > maxwidth) 847 if (width > maxwidth)