mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-30 08:51:10 +02:00
fix fading
This commit is contained in:
@@ -212,6 +212,8 @@ class CFbAccelARM
|
|||||||
int scale2Res(int size);
|
int scale2Res(int size);
|
||||||
bool fullHdAvailable();
|
bool fullHdAvailable();
|
||||||
void setOsdResolutions();
|
void setOsdResolutions();
|
||||||
|
void setBlendMode(uint8_t mode);
|
||||||
|
void setBlendLevel(int level);
|
||||||
#if ENABLE_ARM_ACC
|
#if ENABLE_ARM_ACC
|
||||||
void paintRect(const int x, const int y, const int dx, const int dy, const fb_pixel_t col);
|
void paintRect(const int x, const int y, const int dx, const int dy, const fb_pixel_t col);
|
||||||
#endif
|
#endif
|
||||||
|
@@ -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)
|
int CFbAccelARM::setMode(unsigned int nxRes, unsigned int nyRes, unsigned int nbpp)
|
||||||
{
|
{
|
||||||
if (!available&&!active)
|
if (!available&&!active)
|
||||||
|
@@ -739,12 +739,12 @@ int COsdSetup::showOsdSetup()
|
|||||||
mc->setHint("", LOCALE_MENU_HINT_ROUNDED_CORNERS);
|
mc->setHint("", LOCALE_MENU_HINT_ROUNDED_CORNERS);
|
||||||
osd_menu->addItem(mc);
|
osd_menu->addItem(mc);
|
||||||
#endif
|
#endif
|
||||||
#if !HAVE_ARM_HARDWARE //FIXME: make it usable for AX51
|
|
||||||
// fade windows
|
// fade windows
|
||||||
mc = new CMenuOptionChooser(LOCALE_COLORMENU_FADE, &g_settings.widget_fade, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true );
|
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);
|
mc->setHint("", LOCALE_MENU_HINT_FADE);
|
||||||
osd_menu->addItem(mc);
|
osd_menu->addItem(mc);
|
||||||
#endif
|
|
||||||
// window size
|
// window size
|
||||||
memset(window_size_value, 0, sizeof(window_size_value));
|
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);
|
snprintf(window_size_value, sizeof(window_size_value), "%d / %d", g_settings.window_width, g_settings.window_height);
|
||||||
|
Reference in New Issue
Block a user