#include "ui/console.h"
#include "ui/input.h"
#include "ui/sdl2.h"
-#include "sysemu/sysemu.h"
void sdl2_2d_update(DisplayChangeListener *dcl,
int x, int y, int w, int h)
{
struct sdl2_console *scon = container_of(dcl, struct sdl2_console, dcl);
- DisplaySurface *surf = qemu_console_surface(dcl->con);
+ DisplaySurface *surf = scon->surface;
SDL_Rect rect;
size_t surface_data_offset;
assert(!scon->opengl);
- if (!surf) {
- return;
- }
if (!scon->texture) {
return;
}
scon->texture = NULL;
}
- if (!new_surface) {
+ if (is_placeholder(new_surface) && qemu_console_get_index(dcl->con)) {
sdl2_window_destroy(scon);
return;
}
{
/*
* We let SDL convert for us a few more formats than,
- * the native ones. Thes are the ones I have tested.
+ * the native ones. These are the ones I have tested.
*/
return (format == PIXMAN_x8r8g8b8 ||
format == PIXMAN_a8r8g8b8 ||