diff --git a/ui/gtk-egl.c b/ui/gtk-egl.c index 17755b1185..7ff9f1648c 100644 --- a/ui/gtk-egl.c +++ b/ui/gtk-egl.c @@ -239,14 +239,14 @@ void gd_egl_scanout_texture(DisplayChangeListener *dcl, if (!vc->gfx.esurface) { return; } - - eglMakeCurrent(qemu_egl_display, vc->gfx.esurface, - vc->gfx.esurface, vc->gfx.ectx); - - gtk_egl_set_scanout_mode(vc, true); - egl_fb_setup_for_tex(&vc->gfx.guest_fb, backing_width, backing_height, - backing_id, false); } + + eglMakeCurrent(qemu_egl_display, vc->gfx.esurface, + vc->gfx.esurface, vc->gfx.ectx); + + gtk_egl_set_scanout_mode(vc, true); + egl_fb_setup_for_tex(&vc->gfx.guest_fb, backing_width, backing_height, + backing_id, false); } void gd_egl_scanout_dmabuf(DisplayChangeListener *dcl,