raster pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=753c359e61994833f3900ebe74acdfba283dad08

commit 753c359e61994833f3900ebe74acdfba283dad08
Author: Carsten Haitzler (Rasterman) <ras...@rasterman.com>
Date:   Sun Nov 17 12:07:46 2013 +0900

    ecore_fb - fix fb size get to use evas env vars for fb device
    
    this makes evas ane ecore_fb agree on how to address the fb device.
    this fixes terminology in fb on optimus (dual gpu) setups where you may
    have to declare the exact fb to use (there are 2 of them, not just
    fb0) and makes things consistent at least. this also should fix T253
---
 src/lib/ecore_fb/ecore_fb.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/lib/ecore_fb/ecore_fb.c b/src/lib/ecore_fb/ecore_fb.c
index ff96ac8..5e16f66 100644
--- a/src/lib/ecore_fb/ecore_fb.c
+++ b/src/lib/ecore_fb/ecore_fb.c
@@ -108,7 +108,14 @@ _ecore_fb_size_get(int *w, int *h)
    struct fb_var_screeninfo fb_var;
    int fb;
 
-   fb = open("/dev/fb0", O_RDWR);
+   if (getenv("EVAS_FB_DEV"))
+     fb = open(getenv("EVAS_FB_DEV"), O_RDWR);
+   else
+     {
+        fb = open("/dev/fb/0", O_RDWR);
+        if (fb == -1)
+          fb = open("/dev/fb0", O_RDWR);
+     }
    if (fb < 0)
       goto exit;
 

-- 


Reply via email to