mirror of
https://github.com/xemu-project/xemu.git
synced 2024-11-23 19:49:43 +00:00
ui: fix incorrect scaling on highdpi with gtk/opengl
Signed-off-by: Alexander Orzechowski <orzechowski.alexander@gmail.com> Message-Id: <20211121065504.29101-2-orzechowski.alexander@gmail.com> [ kraxel: codestyle fix ] Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
This commit is contained in:
parent
c5fbdd60cf
commit
4323118cad
@ -41,15 +41,16 @@ void gd_gl_area_draw(VirtualConsole *vc)
|
||||
#ifdef CONFIG_GBM
|
||||
QemuDmaBuf *dmabuf = vc->gfx.guest_fb.dmabuf;
|
||||
#endif
|
||||
int ww, wh, y1, y2;
|
||||
int ww, wh, ws, y1, y2;
|
||||
|
||||
if (!vc->gfx.gls) {
|
||||
return;
|
||||
}
|
||||
|
||||
gtk_gl_area_make_current(GTK_GL_AREA(vc->gfx.drawing_area));
|
||||
ww = gtk_widget_get_allocated_width(vc->gfx.drawing_area);
|
||||
wh = gtk_widget_get_allocated_height(vc->gfx.drawing_area);
|
||||
ws = gdk_window_get_scale_factor(gtk_widget_get_window(vc->gfx.drawing_area));
|
||||
ww = gtk_widget_get_allocated_width(vc->gfx.drawing_area) * ws;
|
||||
wh = gtk_widget_get_allocated_height(vc->gfx.drawing_area) * ws;
|
||||
|
||||
if (vc->gfx.scanout_mode) {
|
||||
if (!vc->gfx.guest_fb.framebuffer) {
|
||||
|
Loading…
Reference in New Issue
Block a user