summaryrefslogtreecommitdiffstats
path: root/apps/plugins/vu_meter.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/plugins/vu_meter.c')
-rw-r--r--apps/plugins/vu_meter.c49
1 files changed, 19 insertions, 30 deletions
diff --git a/apps/plugins/vu_meter.c b/apps/plugins/vu_meter.c
index 66ddf03dd8..80e1960fad 100644
--- a/apps/plugins/vu_meter.c
+++ b/apps/plugins/vu_meter.c
@@ -397,18 +397,7 @@
#define LABEL_MENU "PLAY"
#define LABEL_VOLUME "VOL UP/DN"
-#elif (CONFIG_KEYPAD == XDUOO_X3II_PAD)
-#define VUMETER_QUIT BUTTON_POWER
-#define VUMETER_HELP BUTTON_HOME
-#define VUMETER_MENU BUTTON_PLAY
-#define VUMETER_UP BUTTON_VOL_UP
-#define VUMETER_DOWN BUTTON_VOL_DOWN
-#define LABEL_HELP "HOME"
-#define LABEL_QUIT "POWER"
-#define LABEL_MENU "PLAY"
-#define LABEL_VOLUME "VOL UP/DN"
-
-#elif (CONFIG_KEYPAD == XDUOO_X20_PAD)
+#elif (CONFIG_KEYPAD == XDUOO_X3II_PAD) || (CONFIG_KEYPAD == XDUOO_X20_PAD)
#define VUMETER_QUIT BUTTON_POWER
#define VUMETER_HELP BUTTON_HOME
#define VUMETER_MENU BUTTON_PLAY
@@ -430,7 +419,7 @@
#define LABEL_MENU "PLAY"
#define LABEL_VOLUME "VOL UP/DN"
-#elif (CONFIG_KEYPAD == IHIFI_770_PAD)
+#elif (CONFIG_KEYPAD == IHIFI_770_PAD) || (CONFIG_KEYPAD == IHIFI_800_PAD)
#define VUMETER_QUIT BUTTON_POWER
#define VUMETER_HELP BUTTON_HOME
#define VUMETER_MENU BUTTON_PLAY
@@ -441,15 +430,15 @@
#define LABEL_MENU "PLAY"
#define LABEL_VOLUME "VOL UP/DN"
-#elif (CONFIG_KEYPAD == IHIFI_800_PAD)
+#elif (CONFIG_KEYPAD == EROSQ_PAD)
#define VUMETER_QUIT BUTTON_POWER
-#define VUMETER_HELP BUTTON_HOME
-#define VUMETER_MENU BUTTON_PLAY
+#define VUMETER_HELP BUTTON_BACK
+#define VUMETER_MENU BUTTON_MENU
#define VUMETER_UP BUTTON_VOL_UP
#define VUMETER_DOWN BUTTON_VOL_DOWN
-#define LABEL_HELP "HOME"
+#define LABEL_HELP "BACK"
#define LABEL_QUIT "POWER"
-#define LABEL_MENU "PLAY"
+#define LABEL_MENU "MENU"
#define LABEL_VOLUME "VOL UP/DN"
#else
@@ -551,7 +540,7 @@ struct saved_settings {
bool analog_minimeters;
bool digital_minimeters;
int analog_decay;
- int digital_decay;
+ int digital_decay;
} vumeter_settings;
static void reset_settings(void) {
@@ -561,7 +550,7 @@ static void reset_settings(void) {
vumeter_settings.analog_minimeters=true;
vumeter_settings.digital_minimeters=false;
vumeter_settings.analog_decay=3;
- vumeter_settings.digital_decay=0;
+ vumeter_settings.digital_decay=0;
}
static void calc_scales(void)
@@ -639,11 +628,11 @@ static bool vu_meter_menu(void)
int selection;
bool menu_quit = false;
bool exit = false;
-
+
MENUITEM_STRINGLIST(menu,"VU Meter Menu",NULL,"Meter Type","Scale",
"Minimeters","Decay Speed","Playback Control",
"Quit");
-
+
static const struct opt_items meter_type_option[2] = {
{ "Analog", -1 },
{ "Digital", -1 },
@@ -666,7 +655,7 @@ static bool vu_meter_menu(void)
rb->set_option("Meter Type", &vumeter_settings.meter_type, INT,
meter_type_option, 2, NULL);
break;
-
+
case 1:
if(vumeter_settings.meter_type==ANALOG)
{
@@ -679,7 +668,7 @@ static bool vu_meter_menu(void)
"dBfs", -1, "Linear", -1, NULL);
}
break;
-
+
case 2:
if(vumeter_settings.meter_type==ANALOG)
{
@@ -692,16 +681,16 @@ static bool vu_meter_menu(void)
&vumeter_settings.digital_minimeters);
}
break;
-
+
case 3:
if(vumeter_settings.meter_type==ANALOG)
{
- rb->set_option("Decay Speed", &vumeter_settings.analog_decay, INT,
+ rb->set_option("Decay Speed", &vumeter_settings.analog_decay, INT,
decay_speed_option, 7, NULL);
}
else
{
- rb->set_option("Decay Speed", &vumeter_settings.digital_decay, INT,
+ rb->set_option("Decay Speed", &vumeter_settings.digital_decay, INT,
decay_speed_option, 7, NULL);
}
break;
@@ -779,7 +768,7 @@ static void draw_digital_minimeters(void) {
if(8<(num_right_leds))
rb->lcd_mono_bitmap(sound_max_level, 46, half_height+8, 3, 8);
rb->lcd_set_drawmode(DRMODE_SOLID);
-
+
#ifdef HAVE_LCD_COLOR
rb->lcd_set_foreground(screen_foreground);
#endif
@@ -880,10 +869,10 @@ static void digital_meter(void) {
rb->lcd_set_foreground(LCD_RGBPACK(255, 255 - 23 * i, 0));
#endif
rb->lcd_fillrect((digital_lead + (i*digital_block_width)),
- (half_height + 20), digital_block_width - digital_block_gap,
+ (half_height + 20), digital_block_width - digital_block_gap,
digital_block_height);
}
-
+
#ifdef HAVE_LCD_COLOR
rb->lcd_set_foreground(screen_foreground);
#endif