diff --git a/src/driver/fb_accel.h b/src/driver/fb_accel.h index 944ffc945..7225b7042 100644 --- a/src/driver/fb_accel.h +++ b/src/driver/fb_accel.h @@ -212,6 +212,8 @@ class CFbAccelARM int scale2Res(int size); bool fullHdAvailable(); void setOsdResolutions(); + void setBlendMode(uint8_t mode); + void setBlendLevel(int level); #if ENABLE_ARM_ACC void paintRect(const int x, const int y, const int dx, const int dy, const fb_pixel_t col); #endif diff --git a/src/driver/fb_accel_arm.cpp b/src/driver/fb_accel_arm.cpp index 4575a6314..193f7f0f6 100644 --- a/src/driver/fb_accel_arm.cpp +++ b/src/driver/fb_accel_arm.cpp @@ -316,6 +316,26 @@ void CFbAccelARM::setOsdResolutions() } } +/* original interface: 1 == pixel alpha, 2 == global alpha premultiplied */ +void CFbAccelARM::setBlendMode(uint8_t mode) +{ + /* mode = 1 => reset to no extra transparency */ + if (mode == 1) + setBlendLevel(0); +} + +/* level = 100 -> transparent, level = 0 -> nontransparent */ +void CFbAccelARM::setBlendLevel(int level) +{ + char tmp[3]={0x0}; + int _level = 0xff - ( level * 0xff / 100); + sprintf(tmp,"%d", _level); + int pfd = open("/proc/stb/video/alpha", O_WRONLY); + if (pfd) + write(pfd, tmp, sizeof(tmp)); + close(pfd); +} + int CFbAccelARM::setMode(unsigned int nxRes, unsigned int nyRes, unsigned int nbpp) { if (!available&&!active) diff --git a/src/gui/osd_setup.cpp b/src/gui/osd_setup.cpp index dfb6d4d50..e5d7c4973 100644 --- a/src/gui/osd_setup.cpp +++ b/src/gui/osd_setup.cpp @@ -739,12 +739,12 @@ int COsdSetup::showOsdSetup() mc->setHint("", LOCALE_MENU_HINT_ROUNDED_CORNERS); osd_menu->addItem(mc); #endif -#if !HAVE_ARM_HARDWARE //FIXME: make it usable for AX51 + // fade windows mc = new CMenuOptionChooser(LOCALE_COLORMENU_FADE, &g_settings.widget_fade, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true ); mc->setHint("", LOCALE_MENU_HINT_FADE); osd_menu->addItem(mc); -#endif + // window size memset(window_size_value, 0, sizeof(window_size_value)); snprintf(window_size_value, sizeof(window_size_value), "%d / %d", g_settings.window_width, g_settings.window_height);