mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-26 15:02:50 +02:00
fb_accel_arm/mips: simplify setBlendLevel()
Origin commit data
------------------
Branch: ni/coolstream
Commit: 1115865295
Author: vanhofen <vanhofen@gmx.de>
Date: 2022-11-24 (Thu, 24 Nov 2022)
Origin message was:
------------------
- fb_accel_arm/mips: simplify setBlendLevel()
------------------
No further description and justification available within origin commit message!
------------------
This commit was generated by Migit
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