From: notaz Date: Mon, 6 Sep 2010 19:30:16 +0000 (+0000) Subject: fix build X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=24cf9d991a686c6b758b6ec0bd3060424f9edc8e;p=libpicofe.git fix build git-svn-id: file:///home/notaz/opt/svn/PicoDrive/platform@886 be3aeb3a-fb24-0410-a615-afba39da0efa --- diff --git a/pandora/picorestore.c b/pandora/picorestore.c index 950b98e..d2fb0a3 100644 --- a/pandora/picorestore.c +++ b/pandora/picorestore.c @@ -11,6 +11,8 @@ int main() { struct fb_var_screeninfo fbvar; + struct omapfb_plane_info pi; + struct omapfb_mem_info mi; int ret, fbdev, kbdfd; fbdev = open("/dev/fb0", O_RDWR); @@ -45,18 +47,18 @@ end_fb0: goto end_fb1; } - ret = ioctl(fd, OMAPFB_QUERY_PLANE, &pi); - ret |= ioctl(fd, OMAPFB_QUERY_MEM, &mi); + ret = ioctl(fbdev, OMAPFB_QUERY_PLANE, &pi); + ret |= ioctl(fbdev, OMAPFB_QUERY_MEM, &mi); if (ret != 0) perror("QUERY_*"); pi.enabled = 0; - ret = ioctl(fd, OMAPFB_SETUP_PLANE, &pi); + ret = ioctl(fbdev, OMAPFB_SETUP_PLANE, &pi); if (ret != 0) perror("SETUP_PLANE"); mi.size = 0; - ret = ioctl(fd, OMAPFB_SETUP_MEM, &mi); + ret = ioctl(fbdev, OMAPFB_SETUP_MEM, &mi); if (ret != 0) perror("SETUP_MEM"); diff --git a/pandora/plat.c b/pandora/plat.c index 5992f73..db0690c 100644 --- a/pandora/plat.c +++ b/pandora/plat.c @@ -339,7 +339,7 @@ int pnd_setup_layer(int enabled, int x, int y, int w, int h) void pnd_restore_layer_data(void) { - short *t = ((short *)fb_copy)[320*240 / 2 + 160]; + short *t = (short *)fb_copy + 320*240 / 2 + 160; // right now this is used by menu, which wants to preview something // so try to get something on the layer.