mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-29 08:21:07 +02:00
CFrameBuffer: style fixes
Scope of the some variable can be reduced, and
waitForIdle(): %d in format string requires a signed integer given in
the argument list.
Origin commit data
------------------
Branch: ni/coolstream
Commit: 73cf6e9410
Author: Thilo Graf <dbt@novatux.de>
Date: 2013-05-20 (Mon, 20 May 2013)
------------------
This commit was generated by Migit
This commit is contained in:
@@ -161,9 +161,9 @@ void CFrameBuffer::waitForIdle(const char* func)
|
||||
|
||||
if (count > 512) /* more than 100 are unlikely, */{
|
||||
if (func != NULL)
|
||||
fprintf(stderr, "CFrameBuffer::waitForIdle: count is big (%04d) [%s]!\n", count, func);
|
||||
fprintf(stderr, "CFrameBuffer::waitForIdle: count is big (%04u) [%s]!\n", count, func);
|
||||
else
|
||||
fprintf(stderr, "CFrameBuffer::waitForIdle: count is big (%d)!\n", count);
|
||||
fprintf(stderr, "CFrameBuffer::waitForIdle: count is big (%u)!\n", count);
|
||||
}
|
||||
}
|
||||
#endif /* USE_NEVIS_GXA */
|
||||
@@ -693,11 +693,11 @@ void CFrameBuffer::paintBoxRel(const int x, const int y, const int dx, const int
|
||||
_write_gxa(gxa_base, GXA_BG_COLOR_REG, (unsigned int) col); /* setup the drawing color */
|
||||
#endif
|
||||
|
||||
int line = 0;
|
||||
if (type && radius) {
|
||||
setCornerFlags(type);
|
||||
radius = limitRadius(dx, dy, radius);
|
||||
|
||||
int line = 0;
|
||||
while (line < dy) {
|
||||
int ofl, ofr;
|
||||
if (calcCorners(NULL, &ofl, &ofr, dy, line, radius, type)) {
|
||||
@@ -946,11 +946,9 @@ bool CFrameBuffer::paintIcon(const std::string & filename, const int x, const in
|
||||
{
|
||||
struct rawHeader header;
|
||||
int width, height;
|
||||
int lfd;
|
||||
fb_pixel_t * data;
|
||||
struct rawIcon tmpIcon;
|
||||
std::map<std::string, rawIcon>::iterator it;
|
||||
int dsize;
|
||||
|
||||
if (!getActive())
|
||||
return false;
|
||||
@@ -967,7 +965,7 @@ bool CFrameBuffer::paintIcon(const std::string & filename, const int x, const in
|
||||
data = g_PicViewer->getIcon(newname, &width, &height);
|
||||
|
||||
if(data) {
|
||||
dsize = width*height*sizeof(fb_pixel_t);
|
||||
int dsize = width*height*sizeof(fb_pixel_t);
|
||||
//printf("CFrameBuffer::paintIcon: %s found, data %x size %d x %d\n", newname.c_str(), data, width, height);fflush(stdout);
|
||||
if(cache_size+dsize < ICON_CACHE_SIZE) {
|
||||
cache_size += dsize;
|
||||
@@ -982,7 +980,7 @@ bool CFrameBuffer::paintIcon(const std::string & filename, const int x, const in
|
||||
|
||||
newname = iconBasePath + filename.c_str() + ".raw";
|
||||
|
||||
lfd = open(newname.c_str(), O_RDONLY);
|
||||
int lfd = open(newname.c_str(), O_RDONLY);
|
||||
|
||||
if (lfd == -1) {
|
||||
//printf("paintIcon: error while loading icon: %s\n", newname.c_str());
|
||||
@@ -993,7 +991,7 @@ bool CFrameBuffer::paintIcon(const std::string & filename, const int x, const in
|
||||
tmpIcon.width = width = (header.width_hi << 8) | header.width_lo;
|
||||
tmpIcon.height = height = (header.height_hi << 8) | header.height_lo;
|
||||
|
||||
dsize = width*height*sizeof(fb_pixel_t);
|
||||
int dsize = width*height*sizeof(fb_pixel_t);
|
||||
|
||||
tmpIcon.data = (fb_pixel_t*) cs_malloc_uncached(dsize);
|
||||
data = tmpIcon.data;
|
||||
|
Reference in New Issue
Block a user