mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-27 23:42:58 +02:00
fb_generic: initialization and deinitialization fixes
* initialize variables locked and cache_size in constructor * set lfb pointer to NULL after munmap(), fd to -1 after close * remove unused tty fd close()
This commit is contained in:
committed by
svenhoefer
parent
67387a13c6
commit
1dd47e00c0
@@ -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);
|
||||
@@ -235,13 +235,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();
|
||||
}
|
||||
|
Reference in New Issue
Block a user