diff options
| author | Weifeng Liu <weifeng.liu.z@gmail.com> | 2025-05-11 15:33:19 +0800 |
|---|---|---|
| committer | Marc-André Lureau <marcandre.lureau@redhat.com> | 2025-05-24 17:04:09 +0200 |
| commit | f05e1a93f48729b568fdf86a12d56ee142cee5e1 (patch) | |
| tree | c7e8dbc79b70b26d3da2ce03f4092dcd93c0e838 /ui/sdl2-gl.c | |
| parent | fdc09b028fde9d2ec70418735f354b51c8295d0f (diff) | |
| download | focaccia-qemu-f05e1a93f48729b568fdf86a12d56ee142cee5e1.tar.gz focaccia-qemu-f05e1a93f48729b568fdf86a12d56ee142cee5e1.zip | |
ui/gtk-egl: Render guest content with padding in fixed-scale mode
Scaling was not respected when rendering frames in gtk-egl.c (used if gl=on and X11 mode). To fix this, add fields x and y to struct egl_fb for x offset and y offset so we can add padding to window. Signed-off-by: Weifeng Liu <weifeng.liu.z@gmail.com> Message-ID: <20250511073337.876650-10-weifeng.liu.z@gmail.com> Acked-by: Gerd Hoffmann <kraxel@redhat.com> Acked-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Diffstat (limited to 'ui/sdl2-gl.c')
| -rw-r--r-- | ui/sdl2-gl.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ui/sdl2-gl.c b/ui/sdl2-gl.c index e01d9ab0c7..3be17d1079 100644 --- a/ui/sdl2-gl.c +++ b/ui/sdl2-gl.c @@ -241,7 +241,7 @@ void sdl2_gl_scanout_flush(DisplayChangeListener *dcl, SDL_GL_MakeCurrent(scon->real_window, scon->winctx); SDL_GetWindowSize(scon->real_window, &ww, &wh); - egl_fb_setup_default(&scon->win_fb, ww, wh); + egl_fb_setup_default(&scon->win_fb, ww, wh, 0, 0); egl_fb_blit(&scon->win_fb, &scon->guest_fb, !scon->y0_top); SDL_GL_SwapWindow(scon->real_window); |