From 739e1043a096888785b1fc251824f799a3945294 Mon Sep 17 00:00:00 2001 From: notaz Date: Mon, 6 Sep 2010 19:30:16 +0000 Subject: [PATCH] fix build git-svn-id: file:///home/notaz/opt/svn/PicoDrive@886 be3aeb3a-fb24-0410-a615-afba39da0efa --- platform/pandora/picorestore.c | 10 ++++++---- platform/pandora/plat.c | 2 +- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/platform/pandora/picorestore.c b/platform/pandora/picorestore.c index 950b98ed..d2fb0a3f 100644 --- a/platform/pandora/picorestore.c +++ b/platform/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/platform/pandora/plat.c b/platform/pandora/plat.c index 5992f739..db0690c8 100644 --- a/platform/pandora/plat.c +++ b/platform/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. -- 2.39.5