From f19d7b77aa4b65ae9e6a6a51d9580c9d97746966 Mon Sep 17 00:00:00 2001 From: GiWoong Kim Date: Mon, 17 Mar 2014 18:38:43 +0900 Subject: [PATCH] display: modified qemu_ds_sdl_switch func display surface must be replaced within lock period Change-Id: Idb5215ee1f4eb4400615a04be7b627429a4394bf Signed-off-by: GiWoong Kim --- tizen/src/maru_sdl.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) 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); -- 2.34.1