mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-26 23:13:00 +02:00
fix fading for mips hardware
- untested !
Origin commit data
------------------
Branch: ni/coolstream
Commit: 544fbd1ee2
Author: Frankenstone <dampf_acc@online.de>
Date: 2021-04-23 (Fri, 23 Apr 2021)
------------------
This commit was generated by Migit
This commit is contained in:
@@ -245,6 +245,8 @@ class CFbAccelMIPS
|
||||
int scale2Res(int size);
|
||||
bool fullHdAvailable();
|
||||
void setOsdResolutions();
|
||||
void setBlendMode(uint8_t mode);
|
||||
void setBlendLevel(int level);
|
||||
#if ENABLE_MIPS_ACC
|
||||
void paintRect(const int x, const int y, const int dx, const int dy, const fb_pixel_t col);
|
||||
#endif
|
||||
|
@@ -317,6 +317,26 @@ void CFbAccelMIPS::setOsdResolutions()
|
||||
}
|
||||
}
|
||||
|
||||
/* original interface: 1 == pixel alpha, 2 == global alpha premultiplied */
|
||||
void CFbAccelMIPS::setBlendMode(uint8_t mode)
|
||||
{
|
||||
/* mode = 1 => reset to no extra transparency */
|
||||
if (mode == 1)
|
||||
setBlendLevel(0);
|
||||
}
|
||||
|
||||
/* level = 100 -> transparent, level = 0 -> nontransparent */
|
||||
void CFbAccelMIPS::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 CFbAccelMIPS::setMode(unsigned int nxRes, unsigned int nyRes, unsigned int nbpp)
|
||||
{
|
||||
if (!available&&!active)
|
||||
|
Reference in New Issue
Block a user