blob: 8d43ee44715feaabb161a4b01b90a9aee400b2be (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
term_init() is called everytime a new song starts playing in -C mode
so only after the first song finishes, as a side effect the original
terminal line properties were getting overwritten and therefore were
not restored to the original value. Also as a side effect term_restore()
was called as many times as songs were played, at exit. The patch
fixes this by letting the things be executed only once.
Andrzej Zaborowski <balrog@zabor.org>
diff -Naur mpg123/term.c mpg123b/term.c
--- mpg123/term.c 2000-10-30 17:45:14.000000000 +0000
+++ mpg123b/term.c 2005-06-09 17:52:49.764132264 +0000
@@ -25,7 +25,8 @@
{
struct termios tio;
- term_enable = 0;
+ if (term_enable || !param.term_ctrl)
+ return;
atexit(term_restore);
if(tcgetattr(0,&tio) < 0) {
|