aboutsummaryrefslogtreecommitdiffstats
path: root/lhist_scr.c
diff options
context:
space:
mode:
Diffstat (limited to 'lhist_scr.c')
-rw-r--r--lhist_scr.c21
1 files changed, 8 insertions, 13 deletions
diff --git a/lhist_scr.c b/lhist_scr.c
index 2595b45..55d5d6b 100644
--- a/lhist_scr.c
+++ b/lhist_scr.c
@@ -317,18 +317,6 @@ static void display_key(WINDOW *w_key)
wrefresh(w_key);
}
-static void redraw_lhist(int signum)
-{
- static int vcount = 1;
-
- sampling_do_poll();
- if (!--vcount) {
- vcount = conf.slotsize;
- display_lhist();
- display_key(w_key);
- }
-}
-
void scr_lhist_init(void)
{
w_lhist = newwin_title(0, HIST_WIN_HEIGHT, "Level histogram", true);
@@ -337,13 +325,20 @@ void scr_lhist_init(void)
init_extrema(&e_signal);
init_extrema(&e_noise);
init_extrema(&e_snr);
- sampling_init(redraw_lhist);
+ sampling_init();
display_key(w_key);
}
int scr_lhist_loop(WINDOW *w_menu)
{
+ static int vcount = 1;
+
+ if (!--vcount) {
+ vcount = conf.slotsize;
+ display_lhist();
+ display_key(w_key);
+ }
return wgetch(w_menu);
}