mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-26 15:02:56 +02:00
- fb_accel_arm/mips: simplify setBlendLevel()
This commit is contained in:
@@ -329,10 +329,8 @@ void CFbAccelARM::setBlendMode(uint8_t mode)
|
||||
/* level = 100 -> transparent, level = 0 -> nontransparent */
|
||||
void CFbAccelARM::setBlendLevel(int level)
|
||||
{
|
||||
char buf[16];
|
||||
int value = 255 - (level * 255 / 100);
|
||||
int len = snprintf(buf, sizeof(buf), "%d", value);
|
||||
proc_put("/proc/stb/video/alpha", buf, len);
|
||||
proc_put("/proc/stb/video/alpha", value);
|
||||
}
|
||||
|
||||
int CFbAccelARM::setMode(unsigned int nxRes, unsigned int nyRes, unsigned int nbpp)
|
||||
|
@@ -330,10 +330,8 @@ void CFbAccelMIPS::setBlendMode(uint8_t mode)
|
||||
/* level = 100 -> transparent, level = 0 -> nontransparent */
|
||||
void CFbAccelMIPS::setBlendLevel(int level)
|
||||
{
|
||||
char buf[16];
|
||||
int value = 255 - (level * 255 / 100);
|
||||
int len = snprintf(buf, sizeof(buf), "%d", value);
|
||||
proc_put("/proc/stb/video/alpha", buf, len);
|
||||
proc_put("/proc/stb/video/alpha", value);
|
||||
}
|
||||
|
||||
int CFbAccelMIPS::setMode(unsigned int nxRes, unsigned int nyRes, unsigned int nbpp)
|
||||
|
Reference in New Issue
Block a user