From: GiWoong Kim Date: Mon, 17 Mar 2014 09:38:43 +0000 (+0900) Subject: display: modified qemu_ds_sdl_switch func X-Git-Tag: Tizen_Studio_1.3_Release_p2.3.1~451^2~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F01%2F18501%2F1;p=sdk%2Femulator%2Fqemu.git display: modified qemu_ds_sdl_switch func display surface must be replaced within lock period Change-Id: Idb5215ee1f4eb4400615a04be7b627429a4394bf Signed-off-by: GiWoong Kim --- diff --git a/tizen/src/maru_sdl.c b/tizen/src/maru_sdl.c index efea0f4b61..33f6e35e4c 100644 --- a/tizen/src/maru_sdl.c +++ b/tizen/src/maru_sdl.c @@ -234,17 +234,18 @@ static void qemu_ds_sdl_switch(DisplayChangeListener *dcl, return; } - dpy_surface = new_surface; console_width = surface_width(new_surface); console_height = surface_height(new_surface); - INFO("qemu_ds_sdl_switch : (%d, %d)\n", - console_width, console_height); + INFO("qemu_ds_sdl_switch : (%d, %d)\n", console_width, console_height); #ifdef SDL_THREAD pthread_mutex_lock(&sdl_mutex); #endif + /* switch */ + dpy_surface = new_surface; + if (surface_qemu != NULL) { SDL_FreeSurface(surface_qemu); surface_qemu = NULL; @@ -614,7 +615,7 @@ void maruskin_sdl_interpolation(bool on) static void qemu_update(void) { - if (sdl_alteration == -1) { + if (sdl_alteration < 0) { SDL_FreeSurface(scaled_screen); SDL_FreeSurface(rotated_screen); SDL_FreeSurface(surface_qemu);