Skip to content

Commit

Permalink
- vfd-setup: use new display_can_deepstandby member from libstb-hal
Browse files Browse the repository at this point in the history
Signed-off-by: Thilo Graf <[email protected]>

Build was broken with original cherry-pick. hw_caps_t was incomplete.
  • Loading branch information
svenhoefer authored and dbt1 committed Nov 2, 2017
1 parent 0fac120 commit 674ba19
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions lib/hardware/coolstream/hardware_caps.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ hw_caps_t *get_hwcaps(void) {
caps.display_type = HW_DISPLAY_LINE_TEXT;
caps.display_xres = 12;
caps.display_yres = 0;
caps.display_can_deepstandby = (rev > 7);
caps.can_set_display_brightness = 1;
caps.can_ar_14_9 = 1;
caps.can_ps_14_9 = 1;
Expand Down
1 change: 1 addition & 0 deletions lib/hardware/coolstream/hardware_caps.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ typedef struct hw_caps
display_type_t display_type;
int display_xres; /* x resolution or chars per line */
int display_yres;
int display_can_deepstandby;
int can_set_display_brightness;
char boxvendor[64];
char boxname[64];
Expand Down
4 changes: 3 additions & 1 deletion src/gui/vfd_setup.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -203,12 +203,14 @@ int CVfdSetup::showBrightnessSetup()
nc->setActivateObserver(this);
mn_widget->addItem(nc);

if(cs_get_revision() > 7) {
if (g_info.hw_caps->display_can_deepstandby)
{
nc = new CMenuOptionNumberChooser(LOCALE_LCDCONTROLER_BRIGHTNESSDEEPSTANDBY, &brightnessdeepstandby, true, 0, 15, this, CRCInput::RC_nokey, NULL, 0, 0, NONEXISTANT_LOCALE, true);
nc->setHint("", LOCALE_MENU_HINT_VFD_BRIGHTNESSDEEPSTANDBY);
nc->setActivateObserver(this);
mn_widget->addItem(nc);
}

nc = new CMenuOptionNumberChooser(LOCALE_LCDMENU_DIM_BRIGHTNESS, &g_settings.lcd_setting_dim_brightness, vfd_enabled, -1, 15, NULL, CRCInput::RC_nokey, NULL, 0, -1, LOCALE_OPTIONS_OFF, true);
nc->setHint("", LOCALE_MENU_HINT_VFD_BRIGHTNESSDIM);
nc->setActivateObserver(this);
Expand Down

0 comments on commit 674ba19

Please sign in to comment.