diff options
author | notaz | 2013-03-14 01:04:51 +0200 |
---|---|---|
committer | notaz | 2013-03-15 02:19:21 +0200 |
commit | 8e7632dd01235ea64d7d6e712ce5410a6c594ea4 (patch) | |
tree | b19892bbf0ab8930d24cd123701de37defe8ff45 /frontend | |
parent | ee1a37fd6ae23862dfcdb06958e8f686ce1a5519 (diff) | |
download | pcsx_rearmed-8e7632dd01235ea64d7d6e712ce5410a6c594ea4.tar.gz pcsx_rearmed-8e7632dd01235ea64d7d6e712ce5410a6c594ea4.tar.bz2 pcsx_rearmed-8e7632dd01235ea64d7d6e712ce5410a6c594ea4.zip |
frontend: sdl fixes
Diffstat (limited to 'frontend')
m--------- | frontend/libpicofe | 0 | ||||
-rw-r--r-- | frontend/plat_sdl.c | 9 |
2 files changed, 7 insertions, 2 deletions
diff --git a/frontend/libpicofe b/frontend/libpicofe -Subproject cceadf4cd4f1fa7e7f12b3765bba31bfcef6b1e +Subproject da0cc55643353ab15725194be64a3d8460fe48b diff --git a/frontend/plat_sdl.c b/frontend/plat_sdl.c index dacf584..247437e 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); |