X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?p=pcsx_rearmed.git;a=blobdiff_plain;f=frontend%2Fplat_omap.c;h=e6a1105def8751e9bc29908faea52a4357dc9550;hp=034e9e58ee03ef0ec000f570c6f4756bb111590c;hb=fba064572196c69de43e3c69245369d94d3be929;hpb=bd6267e616cc4966fadf971019fe15db2469e97d diff --git a/frontend/plat_omap.c b/frontend/plat_omap.c index 034e9e58..e6a1105d 100644 --- a/frontend/plat_omap.c +++ b/frontend/plat_omap.c @@ -91,7 +91,7 @@ static int omap_setup_layer_(int fd, int enabled, int x, int y, int w, int h, in } if (first_call) { - mi.size = 640*512*2*3; + mi.size = 640*512*3*3; ret = ioctl(fd, OMAPFB_SETUP_MEM, &mi); if (ret != 0) { perror("SETUP_MEM"); @@ -122,6 +122,10 @@ int omap_enable_layer(int enabled) void plat_video_menu_enter(int is_rom_loaded) { + g_menuscreen_ptr = vout_fbdev_resize(main_fb, + g_menuscreen_w, g_menuscreen_h, 16, 0, 0, 0, 0, 3); + if (g_menuscreen_ptr == NULL) + fprintf(stderr, "warning: vout_fbdev_resize failed\n"); } void plat_video_menu_begin(void) @@ -133,6 +137,17 @@ void plat_video_menu_end(void) g_menuscreen_ptr = vout_fbdev_flip(main_fb); } +void plat_video_menu_leave(void) +{ + /* have to get rid of panning so that plugins that + * use fb0 and don't ever pan can work. */ + vout_fbdev_clear(main_fb); + g_menuscreen_ptr = vout_fbdev_resize(main_fb, + g_menuscreen_w, g_menuscreen_h, 16, 0, 0, 0, 0, 1); + if (g_menuscreen_ptr == NULL) + fprintf(stderr, "warning: vout_fbdev_resize failed\n"); +} + void plat_init(void) { const char *main_fb_name, *layer_fb_name; @@ -155,7 +170,7 @@ void plat_init(void) exit(1); } - ret = omap_setup_layer_(fd, 1, g_layer_x, g_layer_y, g_layer_w, g_layer_h, 1); + ret = omap_setup_layer_(fd, 0, g_layer_x, g_layer_y, g_layer_w, g_layer_h, 1); close(fd); if (ret != 0) { fprintf(stderr, "failed to set up layer, exiting.\n"); @@ -189,7 +204,6 @@ void plat_init(void) goto fail1; } g_menubg_ptr = temp_frame; - g_menubg_src_ptr = temp_frame; in_set_config(in_name_to_id("evdev:gpio-keys"), IN_CFG_KEY_NAMES, pandora_gpio_keys, sizeof(pandora_gpio_keys));