From: notaz Date: Fri, 25 Jul 2008 22:20:12 +0000 (+0000) Subject: misv fixes X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8add01a3a416c0054247a5ea69f1d5d09c23202f;p=libpicofe.git misv fixes git-svn-id: file:///home/notaz/opt/svn/PicoDrive/platform@565 be3aeb3a-fb24-0410-a615-afba39da0efa --- diff --git a/pandora/pandora.c b/pandora/pandora.c index e6c92d9..9c4fc5c 100644 --- a/pandora/pandora.c +++ b/pandora/pandora.c @@ -217,6 +217,13 @@ void gp2x_init(void) exit(1); } */ + fbdev = open("/dev/fb0", O_RDWR); + if (fbdev == -1) + { + printf("open(\"/dev/fb0\") failed with %i\n", errno); + exit(1); + } + ret = ioctl(fbdev, FBIOGET_FSCREENINFO, &fbfix); if (ret == -1) { @@ -231,13 +238,6 @@ void gp2x_init(void) return; } - fbdev = open("/dev/fb0", O_RDWR); - if (fbdev == -1) - { - printf("open(\"/dev/fb0\") failed with %i\n", errno); - exit(1); - } - screen = mmap(0, SCREEN_MAP_SIZE, PROT_WRITE|PROT_READ, MAP_SHARED, fbdev, 0); if (screen == MAP_FAILED) {