From: giwoong.kim Date: Tue, 14 Aug 2012 07:24:24 +0000 (+0900) Subject: [Title] added SDL_FreeSurface X-Git-Tag: Tizen_Studio_1.3_Release_p2.3.1~1517 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f9ade69cb016759d992b73ac66e54ae91c77f749;p=sdk%2Femulator%2Fqemu.git [Title] added SDL_FreeSurface [Type] bugfix [Module] Emulator / sdl [Priority] major [Jira#] [Redmine#] [Problem] [Cause] [Solution] [TestCase] --- diff --git a/tizen/src/maru_sdl.c b/tizen/src/maru_sdl.c index d2e4eb4f36..e31c640ef4 100644 --- a/tizen/src/maru_sdl.c +++ b/tizen/src/maru_sdl.c @@ -94,6 +94,11 @@ void qemu_ds_sdl_resize(DisplayState *ds) pthread_mutex_lock(&sdl_mutex); #endif + if (surface_qemu != NULL) { + SDL_FreeSurface(surface_qemu); + surface_qemu = NULL; + } + /* create surface_qemu */ surface_qemu = SDL_CreateRGBSurfaceFrom(ds_get_data(ds), ds_get_width(ds), @@ -296,6 +301,14 @@ static void qemu_update(void) if (sdl_alteration == 1) { sdl_alteration = 0; _sdl_init(); + + return; + } else if (sdl_alteration == -1) { + SDL_FreeSurface(processing_screen); + SDL_FreeSurface(surface_qemu); + surface_qemu = NULL; + SDL_Quit(); + return; } @@ -486,8 +499,7 @@ void maruskin_sdl_quit(void) glDeleteTextures(1, &texture); } - SDL_FreeSurface(processing_screen); - SDL_Quit(); + sdl_alteration = -1; }