misv fixes
authornotaz <notasas@gmail.com>
Fri, 25 Jul 2008 22:20:12 +0000 (22:20 +0000)
committernotaz <notasas@gmail.com>
Fri, 25 Jul 2008 22:20:12 +0000 (22:20 +0000)
git-svn-id: file:///home/notaz/opt/svn/PicoDrive/platform@565 be3aeb3a-fb24-0410-a615-afba39da0efa

pandora/pandora.c

index e6c92d9..9c4fc5c 100644 (file)
@@ -217,6 +217,13 @@ void gp2x_init(void)
                exit(1);\r
        }\r
 */\r
+       fbdev = open("/dev/fb0", O_RDWR);\r
+       if (fbdev == -1)\r
+       {\r
+               printf("open(\"/dev/fb0\") failed with %i\n", errno);\r
+               exit(1);\r
+       }\r
+\r
        ret = ioctl(fbdev, FBIOGET_FSCREENINFO, &fbfix);\r
        if (ret == -1)\r
        {\r
@@ -231,13 +238,6 @@ void gp2x_init(void)
                return;\r
        }\r
 \r
-       fbdev = open("/dev/fb0", O_RDWR);\r
-       if (fbdev == -1)\r
-       {\r
-               printf("open(\"/dev/fb0\") failed with %i\n", errno);\r
-               exit(1);\r
-       }\r
-\r
        screen = mmap(0, SCREEN_MAP_SIZE, PROT_WRITE|PROT_READ, MAP_SHARED, fbdev, 0);\r
        if (screen == MAP_FAILED)\r
        {\r