Conflicts:
	src/neutrino.cpp


Origin commit data
------------------
Commit: af8c4b8d97
Author: vanhofen <vanhofen@gmx.de>
Date: 2017-02-12 (Sun, 12 Feb 2017)
This commit is contained in:
vanhofen
2017-02-12 23:01:15 +01:00
35 changed files with 111 additions and 43 deletions

View File

@@ -82,6 +82,7 @@ CFrameBuffer::CFrameBuffer()
fb_name = "generic framebuffer";
iconBasePath = "";
available = 0;
cache_size = 0;
cmap.start = 0;
cmap.len = 256;
cmap.red = red;
@@ -93,6 +94,7 @@ CFrameBuffer::CFrameBuffer()
background = NULL;
backupBackground = NULL;
backgroundFilename = "";
locked = false;
fd = 0;
tty = 0;
m_transparent_default = CFrameBuffer::TM_BLACK; // TM_BLACK: Transparency when black content ('pseudo' transparency)
@@ -173,8 +175,6 @@ void CFrameBuffer::init(const char * const fbDevice)
goto nolfb;
}
cache_size = 0;
/* Windows Colors */
paletteSetColor(0x1, 0x010101, tr);
paletteSetColor(0x2, 0x800000, tr);
@@ -240,13 +240,14 @@ CFrameBuffer::~CFrameBuffer()
if (lfb)
munmap(lfb, available);
lfb = NULL;
if (virtual_fb){
delete[] virtual_fb;
virtual_fb = NULL;
}
close(fd);
close(tty);
fd = -1;
v_fbarea.clear();
}
@@ -748,6 +749,12 @@ bool CFrameBuffer::paintIcon8(const std::string & filename, const int x, const i
width = (header.width_hi << 8) | header.width_lo;
height = (header.height_hi << 8) | header.height_lo;
if (width > 768) {
/* this is not going to happen, but check anyway */
printf("%s: icon %s too wide (%d)\n", __func__, filename.c_str(), (int)width);
close(lfd);
return false;
}
unsigned char pixbuf[768];
uint8_t * d = ((uint8_t *)getFrameBufferPointer()) + x * sizeof(fb_pixel_t) + stride * y;
@@ -768,6 +775,7 @@ bool CFrameBuffer::paintIcon8(const std::string & filename, const int x, const i
d += stride;
}
close(lfd);
mark(x, y, x + width, y + height);
return true;
}