mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-27 15:32:59 +02:00
neutrino: update TD version of CFrameBuffer::setBlendLevel
This commit is contained in:
@@ -571,7 +571,7 @@ void CFrameBuffer::setBlendMode(uint8_t mode)
|
|||||||
ioctl(gfxfd, STB04GFX_OSD_SETCONTROL, &g);
|
ioctl(gfxfd, STB04GFX_OSD_SETCONTROL, &g);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CFrameBuffer::setBlendLevel(int blev1, int /*blev2*/)
|
void CFrameBuffer::setBlendLevel(int level)
|
||||||
{
|
{
|
||||||
/* this is bypassing directfb, but faster and easier */
|
/* this is bypassing directfb, but faster and easier */
|
||||||
Stb04GFXOsdControl g;
|
Stb04GFXOsdControl g;
|
||||||
@@ -579,13 +579,13 @@ void CFrameBuffer::setBlendLevel(int blev1, int /*blev2*/)
|
|||||||
if (g.use_global_alpha == 0)
|
if (g.use_global_alpha == 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (blev1 < 0 || blev1 > 100)
|
if (level < 0 || level > 100)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
/* this is the same as convertSetupAlpha2Alpha(), but non-float */
|
/* this is the same as convertSetupAlpha2Alpha(), but non-float */
|
||||||
g.global_alpha = 255 - (255 * blev1 / 100);
|
g.global_alpha = 255 - (255 * level / 100);
|
||||||
ioctl(gfxfd, STB04GFX_OSD_SETCONTROL, &g);
|
ioctl(gfxfd, STB04GFX_OSD_SETCONTROL, &g);
|
||||||
if (blev1 == 100) // sucks
|
if (level == 100) // sucks
|
||||||
usleep(20000);
|
usleep(20000);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
Reference in New Issue
Block a user