struct vout_fbdev *fb;
-static int omap_setup_layer(int fd, int enabled, int x, int y, int w, int h, int first_call)
+static int omap_setup_layer(int fd, int enabled, int x, int y, int w, int h)
{
struct omapfb_plane_info pi = { 0, };
struct omapfb_mem_info mi = { 0, };
perror("SETUP_PLANE");
}
- if (first_call) {
- mi.size = 640*512*3*3;
+ if (mi.size < 240*160*2*4) {
+ mi.size = 240*160*2*4;
ret = ioctl(fd, OMAPFB_SETUP_MEM, &mi);
if (ret != 0) {
perror("SETUP_MEM");
exit(1);
}
- ret = omap_setup_layer(fd, 0, 0, 0, 400, 272, 1);
+ ret = omap_setup_layer(fd, 0, 0, 0, 400, 272);
close(fd);
if (ret != 0) {
fprintf(stderr, "failed to set up layer, exiting.\n");
void gpsp_plat_quit(void)
{
xenv_finish();
- omap_setup_layer(vout_fbdev_get_fd(fb), 0, 0, 0, 0, 0, 0);
+ omap_setup_layer(vout_fbdev_get_fd(fb), 0, 0, 0, 0, 0);
vout_fbdev_finish(fb);
SDL_Quit();
}
lx = 800 / 2 - lw / 2;
ly = 480 / 2 - lh / 2;
- omap_setup_layer(vout_fbdev_get_fd(fb), 1, lx, ly, lw, lh, 0);
+ omap_setup_layer(vout_fbdev_get_fd(fb), 1, lx, ly, lw, lh);
set_filter(filter);
vout_fbdev_resize(fb, w, h, 16, 0, 0, 0, 0, buffers);