From: notaz Date: Wed, 13 Mar 2013 23:04:51 +0000 (+0200) Subject: frontend: sdl fixes X-Git-Tag: r19~6 X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8e7632dd01235ea64d7d6e712ce5410a6c594ea4;p=pcsx_rearmed.git frontend: sdl fixes --- diff --git a/frontend/libpicofe b/frontend/libpicofe index cceadf4c..da0cc556 160000 --- a/frontend/libpicofe +++ b/frontend/libpicofe @@ -1 +1 @@ -Subproject commit cceadf4cd4f1fa7e7f12b3765bba31bfcef6b1e0 +Subproject commit da0cc55643353ab15725194be64a3d8460fe48b1 diff --git a/frontend/plat_sdl.c b/frontend/plat_sdl.c index dacf5840..247437ec 100644 --- a/frontend/plat_sdl.c +++ b/frontend/plat_sdl.c @@ -98,6 +98,7 @@ static void get_layer_pos(int *x, int *y, int *w, int *h) void plat_init(void) { + int shadow_size; int ret; plat_sdl_quit_cb = quit_cb; @@ -110,8 +111,12 @@ void plat_init(void) in_menu = 1; SDL_WM_SetCaption("PCSX-ReARMed " REV, NULL); - shadow_fb = malloc(640 * 512 * 2); - menubg_img = malloc(640 * 512 * 2); + shadow_size = g_menuscreen_w * g_menuscreen_h * 2; + if (shadow_size < 640 * 512 * 2) + shadow_size = 640 * 512 * 2; + + shadow_fb = malloc(shadow_size); + menubg_img = malloc(shadow_size); if (shadow_fb == NULL || menubg_img == NULL) { fprintf(stderr, "OOM\n"); exit(1);