forked from enlightenment/efl
From: Vikram Narayanan <vikram186@gmail.com>
Subject: [E-devel] [PATCH] ecore/ecore_fb: Tweaks in _ecore_fb_size_get As the width and height are defined as static, no need to initialize it again to zero. Also removed checks for 'valid pointers' as it is redundant. SVN revision: 69556
This commit is contained in:
parent
f33084555f
commit
77a76443ec
|
@ -51,3 +51,4 @@ Bluezery <ohpowel@gmail.com>
|
|||
Doyoun Kang <wayofmine@gmail.com> <doyoun.kang@samsung.com>
|
||||
Haifeng Deng <haifeng.deng@samsung.com>
|
||||
Jérémy Zurcher <jeremy@asynk.ch>
|
||||
Vikram Narayanan <vikram186@gmail.com>
|
||||
|
|
|
@ -92,22 +92,19 @@ _ecore_fb_size_get(int *w, int *h)
|
|||
|
||||
fb = open("/dev/fb0", O_RDWR);
|
||||
if (fb < 0)
|
||||
{
|
||||
if (w) *w = 0;
|
||||
if (h) *h = 0;
|
||||
return;
|
||||
}
|
||||
goto exit;
|
||||
|
||||
if (ioctl(fb, FBIOGET_VSCREENINFO, &fb_var) == -1)
|
||||
{
|
||||
if (w) *w = 0;
|
||||
if (h) *h = 0;
|
||||
goto err_ioctl;
|
||||
|
||||
*w = fb_var.xres;
|
||||
*h = fb_var.yres;
|
||||
|
||||
err_ioctl:
|
||||
close(fb);
|
||||
exit:
|
||||
return;
|
||||
}
|
||||
close(fb);
|
||||
if (w) *w = fb_var.xres;
|
||||
if (h) *h = fb_var.yres;
|
||||
}
|
||||
|
||||
/**
|
||||
* @}
|
||||
|
|
Loading…
Reference in New Issue