diff options
author | Weifeng Liu <weifeng.liu.z@gmail.com> | 2025-05-11 15:33:16 +0800 |
---|---|---|
committer | Marc-André Lureau <marcandre.lureau@redhat.com> | 2025-05-24 17:03:42 +0200 |
commit | 02f25490879096b679ab3d7cb7f0facfef7c6484 (patch) | |
tree | f8f2f6fef23f460bd936e9cb9c3395f2734c1161 | |
parent | 30aa105640b0a2a541744b6584d57c9a4b86debd (diff) | |
download | qemu-02f25490879096b679ab3d7cb7f0facfef7c6484.zip qemu-02f25490879096b679ab3d7cb7f0facfef7c6484.tar.gz qemu-02f25490879096b679ab3d7cb7f0facfef7c6484.tar.bz2 |
ui/gtk: Don't update scale in fixed scale mode in gtk-egl.c
Scale shouldn't be changed until user explicitly requests it in fixed
scale mode (full-screen=false and free-scale=false). Use function
gd_update_scale to complete scale updating instead.
Signed-off-by: Weifeng Liu <weifeng.liu.z@gmail.com>
Message-ID: <20250511073337.876650-7-weifeng.liu.z@gmail.com>
Acked-by: Gerd Hoffmann <kraxel@redhat.com>
Acked-by: Marc-André Lureau <marcandre.lureau@redhat.com>
-rw-r--r-- | ui/gtk-egl.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/ui/gtk-egl.c b/ui/gtk-egl.c index 947c993..f8e4f4b 100644 --- a/ui/gtk-egl.c +++ b/ui/gtk-egl.c @@ -95,8 +95,9 @@ void gd_egl_draw(VirtualConsole *vc) #endif gd_egl_scanout_flush(&vc->gfx.dcl, 0, 0, vc->gfx.w, vc->gfx.h); - vc->gfx.scale_x = (double)ww / surface_width(vc->gfx.ds); - vc->gfx.scale_y = (double)wh / surface_height(vc->gfx.ds); + gd_update_scale(vc, ww, wh, + surface_width(vc->gfx.ds), + surface_height(vc->gfx.ds)); glFlush(); #ifdef CONFIG_GBM @@ -122,8 +123,9 @@ void gd_egl_draw(VirtualConsole *vc) eglSwapBuffers(qemu_egl_display, vc->gfx.esurface); - vc->gfx.scale_x = (double)ww / surface_width(vc->gfx.ds); - vc->gfx.scale_y = (double)wh / surface_height(vc->gfx.ds); + gd_update_scale(vc, ww, wh, + surface_width(vc->gfx.ds), + surface_height(vc->gfx.ds)); glFlush(); } |