ecore_fb: allow ecore_fb to not setup VT.
Some systems won't allow VT to be setup due permissions to KDSETMODE to KD_GRAPHICS. Introduce $ECORE_FB_NO_VT envvar to allow skip that setup.
This commit is contained in:
parent
806be7adc0
commit
5e006baacf
|
@ -41,11 +41,17 @@ nosigint(int val EINA_UNUSED)
|
||||||
EAPI int
|
EAPI int
|
||||||
ecore_fb_init(const char *name)
|
ecore_fb_init(const char *name)
|
||||||
{
|
{
|
||||||
|
const char *s;
|
||||||
|
|
||||||
if (++_ecore_fb_init_count != 1)
|
if (++_ecore_fb_init_count != 1)
|
||||||
return _ecore_fb_init_count;
|
return _ecore_fb_init_count;
|
||||||
|
|
||||||
if (!ecore_fb_vt_init())
|
s = getenv("ECORE_FB_NO_VT");
|
||||||
return --_ecore_fb_init_count;
|
if ((!s) || (atoi(s) == 0))
|
||||||
|
{
|
||||||
|
if (!ecore_fb_vt_init())
|
||||||
|
return --_ecore_fb_init_count;
|
||||||
|
}
|
||||||
|
|
||||||
if (!oldhand)
|
if (!oldhand)
|
||||||
{
|
{
|
||||||
|
@ -69,6 +75,8 @@ ecore_fb_init(const char *name)
|
||||||
EAPI int
|
EAPI int
|
||||||
ecore_fb_shutdown(void)
|
ecore_fb_shutdown(void)
|
||||||
{
|
{
|
||||||
|
const char *s;
|
||||||
|
|
||||||
if (--_ecore_fb_init_count != 0)
|
if (--_ecore_fb_init_count != 0)
|
||||||
return _ecore_fb_init_count;
|
return _ecore_fb_init_count;
|
||||||
|
|
||||||
|
@ -77,8 +85,12 @@ ecore_fb_shutdown(void)
|
||||||
signal(SIGINT, oldhand);
|
signal(SIGINT, oldhand);
|
||||||
oldhand = NULL;
|
oldhand = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
ecore_fb_vt_shutdown();
|
s = getenv("ECORE_FB_NO_VT");
|
||||||
|
if ((!s) || (atoi(s) == 0))
|
||||||
|
{
|
||||||
|
ecore_fb_vt_shutdown();
|
||||||
|
}
|
||||||
|
|
||||||
return _ecore_fb_init_count;
|
return _ecore_fb_init_count;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue