tizen/src/maru_sdl.c: Fix improper operations with SDL surfaces.
The bug is that vga_hw_update() invokes dpy_update() where
qemu_ds_update() is called.
qemu_ds_update() sends a signal to thread run_qemu_update() waiting
to be released and to invoke qemu_update().
After this happens there are two ways possible:
1. run_qemu_update() is released, got mutex and qemu_update() is called.
Simultaneously qemu_ds_refresh() is waiting on the mutex to perform
SDL_SetVideoMode(). This is most common way.
2. If we unlucky,
vga_hw_update() returns and qemu_ds_refresh() gets mutex before
run_qemu_update() is released. In this way SDL_SetVideoMode() is called
before qemu_update() is invoked. This leads qemu_update() to operate on
invalidated surface_qemu.
So, to solve this problem we can add a flag indicating that qemu_update()
finished it's work and that we free to invoke SDL_SetVideoMode().
Or we can simply move vga_hw_update() invocation after SDL_SetVideoMode() call.
We chose the second variant as more efficient.
Signed-off-by: Evgeny Voevodin <e.voevodin@samsung.com>