diff options
author | Tobias Kortkamp <tobik@FreeBSD.org> | 2020-05-30 00:39:11 +0000 |
---|---|---|
committer | Tobias Kortkamp <tobik@FreeBSD.org> | 2020-05-30 00:39:11 +0000 |
commit | 0803b3611a1ff13a2dab916722403ef4d7523052 (patch) | |
tree | 00777558bc02fe30f96d5eca0b710ee1c8fe5cfd /audio/cava/files/patch-cava.c | |
parent | graphics/sane-backends: Update to 1.0.30 (diff) |
audio/cava: Update to 0.7.0
Changes: https://github.com/karlstav/cava/releases/tag/0.7.0
Notes
Notes:
svn path=/head/; revision=537023
Diffstat (limited to 'audio/cava/files/patch-cava.c')
-rw-r--r-- | audio/cava/files/patch-cava.c | 65 |
1 files changed, 56 insertions, 9 deletions
diff --git a/audio/cava/files/patch-cava.c b/audio/cava/files/patch-cava.c index 74b65e3b7b91..8e2573a16b5c 100644 --- a/audio/cava/files/patch-cava.c +++ b/audio/cava/files/patch-cava.c @@ -1,15 +1,62 @@ ---- cava.c.orig 2018-10-04 05:51:51 UTC +--- cava.c.orig 2020-05-26 20:29:47 UTC +++ cava.c -@@ -341,8 +341,12 @@ as of 0.4.0 all options are specified in config file, - "/dev/console") == 0) inAtty = 1; +@@ -32,13 +32,11 @@ + #include "util.h" - if (inAtty) { + #ifdef NCURSES +-#include "output/terminal_bcircle.h" + #include "output/terminal_ncurses.h" + #include <curses.h> + #endif + + #include "output/raw.h" +-#include "output/terminal_noncurses.h" + + #include "input/alsa.h" + #include "input/common.h" +@@ -91,8 +89,6 @@ void cleanup(void) { + #else + ; + #endif +- } else if (output_mode == OUTPUT_NONCURSES) { +- cleanup_terminal_noncurses(); + } + } + +@@ -338,8 +334,12 @@ as of 0.4.0 all options are specified in config file, + if (strncmp(ttyname(0), "/dev/ttys", 9) == 0) + inAtty = 0; + if (inAtty) { +#ifdef __FreeBSD__ -+ system("/usr/sbin/vidcontrol -f " FONT_DIR "/cava.fnt >/dev/null 2>&1"); ++ system("/usr/sbin/vidcontrol -f " FONT_DIR "/cava.fnt >/dev/null 2>&1"); +#else - system("setfont cava.psf >/dev/null 2>&1"); - system("setterm -blank 0"); + system("setfont cava.psf >/dev/null 2>&1"); + system("setterm -blank 0"); +#endif - } - } + } + // We use unicode block characters to draw the bars and +@@ -547,12 +547,6 @@ as of 0.4.0 all options are specified in config file, + height = lines * 8; + break; + #endif +- case OUTPUT_NONCURSES: +- get_terminal_dim_noncurses(&width, &lines); +- init_terminal_noncurses(p.col, p.bgcol, width, lines, p.bar_width); +- height = (lines - 1) * 8; +- break; +- + case OUTPUT_RAW: + if (strcmp(p.raw_target, "/dev/stdout") != 0) { + // checking if file exists +@@ -998,10 +992,6 @@ as of 0.4.0 all options are specified in config file, + p.gradient); + break; + #endif +- case OUTPUT_NONCURSES: +- rc = draw_terminal_noncurses(inAtty, lines, width, number_of_bars, p.bar_width, +- p.bar_spacing, rest, bars, previous_frame); +- break; + case OUTPUT_RAW: + rc = print_raw_out(number_of_bars, fp, p.is_bin, p.bit_format, p.ascii_range, + p.bar_delim, p.frame_delim, bars); |