void dpy_gfx_replace_surface(QemuConsole *con,
                             DisplaySurface *surface)
{
    DisplayState *s = con->ds;
    DisplaySurface *old_surface = con->surface;
    DisplayChangeListener *dcl;
    con->surface = surface;
    QLIST_FOREACH(dcl, &s->listeners, next) {
        if (con != (dcl->con ? dcl->con : active_console)) {
            continue;
        }
        if (dcl->ops->dpy_gfx_switch) {
            dcl->ops->dpy_gfx_switch(dcl, surface);
        }
    }
    qemu_free_displaysurface(old_surface);
}
void dpy_gfx_replace_surface(QemuConsole *con,
                             DisplaySurface *surface)
{
    DisplayState *s = con->ds;
    DisplaySurface *old_surface = con->surface;
    DisplayChangeListener *dcl;
    con->surface = surface;
    QLIST_FOREACH(dcl, &s->listeners, next) {
        if (con != (dcl->con ? dcl->con : active_console)) {
            continue;
        }
        if (dcl->ops->dpy_gfx_switch) {
            dcl->ops->dpy_gfx_switch(dcl, surface);
        }
    }
    qemu_free_displaysurface(old_surface);
}
void FUNC_0(QemuConsole *VAR_0,
                             DisplaySurface *VAR_1)
{
    DisplayState *s = VAR_0->ds;
    DisplaySurface *old_surface = VAR_0->VAR_1;
    DisplayChangeListener *dcl;
    VAR_0->VAR_1 = VAR_1;
    QLIST_FOREACH(dcl, &s->listeners, next) {
        if (VAR_0 != (dcl->VAR_0 ? dcl->VAR_0 : active_console)) {
            continue;
        }
        if (dcl->ops->dpy_gfx_switch) {
            dcl->ops->dpy_gfx_switch(dcl, VAR_1);
        }
    }
    qemu_free_displaysurface(old_surface);
}
void FUNC_0(QemuConsole *VAR_0,
DisplaySurface *VAR_1)
{ DisplayState *s = VAR_0->ds; DisplaySurface *old_surface = VAR_0->VAR_1; DisplayChangeListener *dcl; VAR_0->VAR_1 = VAR_1; QLIST_FOREACH(dcl, &s->listeners, next) { if (VAR_0 != (dcl->VAR_0 ? dcl->VAR_0 : active_console)) { continue; } if (dcl->ops->dpy_gfx_switch) { dcl->ops->dpy_gfx_switch(dcl, VAR_1); } } qemu_free_displaysurface(old_surface); }