aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAndreas Eversberg <jolly@eversberg.eu>2016-06-19 17:43:48 +0200
committerAndreas Eversberg <jolly@eversberg.eu>2016-06-19 17:43:48 +0200
commitb45b0c6bacf1ae52c23c5030dcc6994c906815a4 (patch)
tree04a3ed313cedc7a197174dc390d770b64424729f /src
parentf87e36fa47eadfff43653f81fc8aae0fe538bfbe (diff)
common code: Minor fix in main loop
Diffstat (limited to 'src')
-rw-r--r--src/common/main_common.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/common/main_common.c b/src/common/main_common.c
index aef582e..68d8584 100644
--- a/src/common/main_common.c
+++ b/src/common/main_common.c
@@ -316,21 +316,22 @@ void main_loop(int *quit, int latency, int interval)
call_mncc_clock();
}
+next_char:
c = get_char();
switch (c) {
case 3:
/* quit */
*quit = 1;
- break;
+ goto next_char;
case 'w':
/* toggle display */
display_wave_on(-1);
- break;
- default:
- /* process audio of built-in call control */
- process_call(c);
+ goto next_char;
}
+ /* process audio of built-in call control */
+ process_call(c);
+
/* sleep a while */
usleep(interval * 1000);
}