Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Load/save V.U. meter style from/to DeaDBeeF config file #2

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions vumeter.c
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
#define STR_GRADIENT_VERTICAL "Vertical"
#define STR_GRADIENT_HORIZONTAL "Horizontal"

#define CONFSTR_MS_STYLE "vu_meter.style"
#define CONFSTR_MS_REFRESH_INTERVAL "vu_meter.refresh_interval"
#define CONFSTR_MS_DB_RANGE "vu_meter.db_range"
#define CONFSTR_MS_ENABLE_HGRID "vu_meter.enable_hgrid"
Expand Down Expand Up @@ -112,6 +113,7 @@ static uint32_t CONFIG_COLOR_HGRID32 = 0xff666666;
static void
save_config (void)
{
deadbeef->conf_set_int (CONFSTR_MS_STYLE, CONFIG_STYLE);
deadbeef->conf_set_int (CONFSTR_MS_REFRESH_INTERVAL, CONFIG_REFRESH_INTERVAL);
deadbeef->conf_set_int (CONFSTR_MS_DB_RANGE, CONFIG_DB_RANGE);
deadbeef->conf_set_int (CONFSTR_MS_ENABLE_HGRID, CONFIG_ENABLE_HGRID);
Expand Down Expand Up @@ -147,6 +149,7 @@ static void
load_config (void)
{
deadbeef->conf_lock ();
CONFIG_STYLE = deadbeef->conf_get_int (CONFSTR_MS_STYLE, 0);
CONFIG_GRADIENT_ORIENTATION = deadbeef->conf_get_int (CONFSTR_MS_GRADIENT_ORIENTATION, 0);
CONFIG_DB_RANGE = deadbeef->conf_get_int (CONFSTR_MS_DB_RANGE, 70);
CONFIG_ENABLE_HGRID = deadbeef->conf_get_int (CONFSTR_MS_ENABLE_HGRID, 1);
Expand Down