mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-28 07:51:19 +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";
|
fb_name = "generic framebuffer";
|
||||||
iconBasePath = "";
|
iconBasePath = "";
|
||||||
available = 0;
|
available = 0;
|
||||||
|
cache_size = 0;
|
||||||
cmap.start = 0;
|
cmap.start = 0;
|
||||||
cmap.len = 256;
|
cmap.len = 256;
|
||||||
cmap.red = red;
|
cmap.red = red;
|
||||||
@@ -93,6 +94,7 @@ CFrameBuffer::CFrameBuffer()
|
|||||||
background = NULL;
|
background = NULL;
|
||||||
backupBackground = NULL;
|
backupBackground = NULL;
|
||||||
backgroundFilename = "";
|
backgroundFilename = "";
|
||||||
|
locked = false;
|
||||||
fd = 0;
|
fd = 0;
|
||||||
tty = 0;
|
tty = 0;
|
||||||
m_transparent_default = CFrameBuffer::TM_BLACK; // TM_BLACK: Transparency when black content ('pseudo' transparency)
|
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;
|
goto nolfb;
|
||||||
}
|
}
|
||||||
|
|
||||||
cache_size = 0;
|
|
||||||
|
|
||||||
/* Windows Colors */
|
/* Windows Colors */
|
||||||
paletteSetColor(0x1, 0x010101, tr);
|
paletteSetColor(0x1, 0x010101, tr);
|
||||||
paletteSetColor(0x2, 0x800000, tr);
|
paletteSetColor(0x2, 0x800000, tr);
|
||||||
@@ -235,13 +235,14 @@ CFrameBuffer::~CFrameBuffer()
|
|||||||
|
|
||||||
if (lfb)
|
if (lfb)
|
||||||
munmap(lfb, available);
|
munmap(lfb, available);
|
||||||
|
lfb = NULL;
|
||||||
|
|
||||||
if (virtual_fb){
|
if (virtual_fb){
|
||||||
delete[] virtual_fb;
|
delete[] virtual_fb;
|
||||||
virtual_fb = NULL;
|
virtual_fb = NULL;
|
||||||
}
|
}
|
||||||
close(fd);
|
close(fd);
|
||||||
close(tty);
|
fd = -1;
|
||||||
|
|
||||||
v_fbarea.clear();
|
v_fbarea.clear();
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user