Merge branch 'cst-next' into nmp-cst-next

Origin commit data
------------------
Commit: f628ca6af8
Author: Michael Liebmann <tuxcode.bbg@gmail.com>
Date: 2016-01-28 (Thu, 28 Jan 2016)
This commit is contained in:
Michael Liebmann
2016-01-28 05:32:50 +01:00
17 changed files with 273 additions and 71 deletions

View File

@@ -820,6 +820,26 @@ bool split_config_string(const std::string &str, std::map<std::string,std::strin
return !smap.empty();
}
/* align for hw blit */
uint32_t GetWidth4FB_HW_ACC(const uint32_t _x, const uint32_t _w, const bool max)
{
uint32_t ret = _w;
static uint32_t xRes = 0;
if (xRes == 0)
xRes = CFrameBuffer::getInstance()->getScreenWidth(true);
if ((_x + ret) >= xRes)
ret = xRes-_x-1;
if (ret%4 == 0)
return ret;
int add = (max) ? 3 : 0;
ret = ((ret + add) / 4) * 4;
if ((_x + ret) >= xRes)
ret -= 4;
return ret;
}
std::vector<std::string> split(const std::string &s, char delim)
{
std::vector<std::string> vec;