mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-30 08:51:04 +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()
Origin commit data
------------------
Commit: 1dd47e00c0
Author: Stefan Seyfried <seife@tuxbox-git.slipkontur.de>
Date: 2017-02-11 (Sat, 11 Feb 2017)
This commit is contained in:
committed by
vanhofen
parent
2089e8ff6b
commit
f2bfc73bd5
@@ -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