From nobody Tue Nov 18 02:53:12 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1607878733; cv=none; d=zohomail.com; s=zohoarc; b=eYRJFpXG2JEUIt1IQ6NIGD2haPc0sGgVU1bzr2ES86ERL94BLiO+uQz/g3meo8JT6OurWCanTU8fSuiFYLZ0yKza0oGPt4GsBl2VBkK/vfDKCe1CVSgD0Tyx9V4QOqx/t0KIjnz97Ee9Mfn0k47pDe6vSQl28s8hoFydW0xL/Zw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1607878733; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=fOWWfnCthuTSKI6mkgu3fpilCRaK+Se37kctiZzHOWc=; b=gYtSnGMeejBCG1ST3akJrbaISASmJUUGUkPT9hCPwURM714kIUXWVVrX4V/n8ZLH8Cc+jsLoV3O5h2cJB8Ew19SewzITy2G0+szglFsy82kur+Jpx40lESLYQ3qDSV2VO6JtqponA7IWvL4FHpN/JZ1SG0C6dICbC0LDy0FedjE= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1607878733751387.16187987523097; Sun, 13 Dec 2020 08:58:53 -0800 (PST) Received: from localhost ([::1]:53818 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1koUhw-0007Pz-Lu for importer@patchew.org; Sun, 13 Dec 2020 11:58:52 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:49984) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1koUgi-0005f5-5Z for qemu-devel@nongnu.org; Sun, 13 Dec 2020 11:57:37 -0500 Received: from mailout05.t-online.de ([194.25.134.82]:53070) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1koUgd-0003SN-Dd for qemu-devel@nongnu.org; Sun, 13 Dec 2020 11:57:35 -0500 Received: from fwd39.aul.t-online.de (fwd39.aul.t-online.de [172.20.27.138]) by mailout05.t-online.de (Postfix) with SMTP id 6E6E14227545; Sun, 13 Dec 2020 17:57:28 +0100 (CET) Received: from linpower.localnet (Ek9QqoZ-whcrnA6x+fHTldCjtha-p66E1LdjOFCzbE7gC0yAulmxc3PwNhHa9DEQX3@[79.208.17.59]) by fwd39.t-online.de with (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384 encrypted) esmtp id 1koUgW-1Okecy0; Sun, 13 Dec 2020 17:57:24 +0100 Received: by linpower.localnet (Postfix, from userid 1000) id 0F257200451; Sun, 13 Dec 2020 17:57:24 +0100 (CET) From: =?UTF-8?q?Volker=20R=C3=BCmelin?= To: Gerd Hoffmann Subject: [PATCH 1/3] ui/gtk: don't try to redefine SI prefixes Date: Sun, 13 Dec 2020 17:57:22 +0100 Message-Id: <20201213165724.13418-1-vr_qemu@t-online.de> X-Mailer: git-send-email 2.26.2 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ID: Ek9QqoZ-whcrnA6x+fHTldCjtha-p66E1LdjOFCzbE7gC0yAulmxc3PwNhHa9DEQX3 X-TOI-EXPURGATEID: 150726::1607878644-00000BD0-A2FDF743/0/0 CLEAN NORMAL X-TOI-MSGID: 681ef9ac-db59-42af-b80f-557303083428 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: none client-ip=194.25.134.82; envelope-from=volker.ruemelin@t-online.de; helo=mailout05.t-online.de X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , QEMU , Nikola Pavlica Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Redefining SI prefixes is always wrong. 1s has per definition 1000ms. Remove the misnamed named constant and replace it with a comment explaining the frequency to period conversion in two simple steps. Now you can cancel out the unit mHz in the comment with the implicit unit mHz in refresh_rate_millihz and see why the implicit unit ms for update_interval remains. Signed-off-by: Volker R=C3=BCmelin --- include/ui/gtk.h | 2 -- ui/gtk.c | 3 ++- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/include/ui/gtk.h b/include/ui/gtk.h index eaeb450f91..80851fb4c7 100644 --- a/include/ui/gtk.h +++ b/include/ui/gtk.h @@ -24,8 +24,6 @@ #include "ui/egl-context.h" #endif =20 -#define MILLISEC_PER_SEC 1000000 - typedef struct GtkDisplayState GtkDisplayState; =20 typedef struct VirtualGfxConsole { diff --git a/ui/gtk.c b/ui/gtk.c index a752aa22be..86b386a20d 100644 --- a/ui/gtk.c +++ b/ui/gtk.c @@ -798,7 +798,8 @@ static gboolean gd_draw_event(GtkWidget *widget, cairo_= t *cr, void *opaque) refresh_rate_millihz =3D gd_refresh_rate_millihz(vc->window ? vc->window : s->window); if (refresh_rate_millihz) { - vc->gfx.dcl.update_interval =3D MILLISEC_PER_SEC / refresh_rate_mi= llihz; + /* T =3D 1 / f =3D 1 [s*Hz] / f =3D 1000*1000 [ms*mHz] / f */ + vc->gfx.dcl.update_interval =3D 1000 * 1000 / refresh_rate_millihz; } =20 fbw =3D surface_width(vc->gfx.ds); --=20 2.26.2 From nobody Tue Nov 18 02:53:12 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1607878730; cv=none; d=zohomail.com; s=zohoarc; b=lBdzmWk9zpT+ink3lEFramNnBQt2wxEBMBHM/qIrLobRRYGITx/teGOFgzOZg/T10oBsS1YulI/84GwQQsty84LEeLFc13MAwY+Rq6DsOTyNE6LpaYWFN9oaxVdC0CzeTcSP5K97dRw4I9hCZj26oEkpw+FzU7IRokp/th4fla4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1607878730; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=Gnl0z3NtPa2wqF14TEGqaFqzJXDqkMN4S+EUX54xbOY=; b=kg7DKnh3eWXfhZpqCb639rpEuU7oZYbwvzD4NRhU114L2C+nF/BG2jWmIZD+6TLTWQiWd6qTtfZ0aApdZPJCAue13XskLuuujewhXUvuh7Bom/C1DqYdzwWpPjrGfodZ04gO5f80jhpLdn6FKkUbyoNcKlJvB1chjy3gaTXphfU= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 16078787308471018.4191916647147; Sun, 13 Dec 2020 08:58:50 -0800 (PST) Received: from localhost ([::1]:53570 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1koUht-0007K8-OT for importer@patchew.org; Sun, 13 Dec 2020 11:58:49 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:49954) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1koUge-0005dH-3g for qemu-devel@nongnu.org; Sun, 13 Dec 2020 11:57:32 -0500 Received: from mailout08.t-online.de ([194.25.134.20]:35058) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1koUgc-0003SF-C2 for qemu-devel@nongnu.org; Sun, 13 Dec 2020 11:57:31 -0500 Received: from fwd02.aul.t-online.de (fwd02.aul.t-online.de [172.20.26.148]) by mailout08.t-online.de (Postfix) with SMTP id AE81E417B4C9; Sun, 13 Dec 2020 17:57:27 +0100 (CET) Received: from linpower.localnet (VTwmWaZQwhPd+OXvpwybyOOuGlUOJ6YlQESurqbHJEpgW47dywQcazuuyNZla2pZAF@[79.208.17.59]) by fwd02.t-online.de with (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384 encrypted) esmtp id 1koUgZ-0PNitc0; Sun, 13 Dec 2020 17:57:27 +0100 Received: by linpower.localnet (Postfix, from userid 1000) id 10D49200615; Sun, 13 Dec 2020 17:57:24 +0100 (CET) From: =?UTF-8?q?Volker=20R=C3=BCmelin?= To: Gerd Hoffmann Subject: [PATCH 2/3] ui/gtk: rename variable window to widget Date: Sun, 13 Dec 2020 17:57:23 +0100 Message-Id: <20201213165724.13418-2-vr_qemu@t-online.de> X-Mailer: git-send-email 2.26.2 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ID: VTwmWaZQwhPd+OXvpwybyOOuGlUOJ6YlQESurqbHJEpgW47dywQcazuuyNZla2pZAF X-TOI-EXPURGATEID: 150726::1607878647-0000F958-07F82434/0/0 CLEAN NORMAL X-TOI-MSGID: a29b28fa-90da-4d94-a3ca-83e5eabaec0f Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: none client-ip=194.25.134.20; envelope-from=volker.ruemelin@t-online.de; helo=mailout08.t-online.de X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , QEMU , Nikola Pavlica Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" The type of the variable window is GtkWidget. Rename the variable from window to widget, because windows and widgets are different things. Signed-off-by: Volker R=C3=BCmelin --- ui/gtk.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ui/gtk.c b/ui/gtk.c index 86b386a20d..7ff9327b9d 100644 --- a/ui/gtk.c +++ b/ui/gtk.c @@ -752,13 +752,13 @@ static void gd_resize_event(GtkGLArea *area, * If available, return the refresh rate of the display in milli-Hertz, * else return 0. */ -static int gd_refresh_rate_millihz(GtkWidget *window) +static int gd_refresh_rate_millihz(GtkWidget *widget) { #ifdef GDK_VERSION_3_22 - GdkWindow *win =3D gtk_widget_get_window(window); + GdkWindow *win =3D gtk_widget_get_window(widget); =20 if (win) { - GdkDisplay *dpy =3D gtk_widget_get_display(window); + GdkDisplay *dpy =3D gtk_widget_get_display(widget); GdkMonitor *monitor =3D gdk_display_get_monitor_at_window(dpy, win= ); =20 return gdk_monitor_get_refresh_rate(monitor); --=20 2.26.2 From nobody Tue Nov 18 02:53:12 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1607878736; cv=none; d=zohomail.com; s=zohoarc; b=Cp4Cg6ko/TE/TPIcyMKv0SotKkrmN1FJhn7RD0q5wNxN1nU57Lmf9xidNnbwCrwPm5iSKa/X123nUF5UYrmjE53jQFaD/rRH5u5e9UFrGw1Gaygysc74JokVPCc2OAcnqff2zCMcWdCXvGrWdmYcEWlOK18Swk6Cu7dN6PqS9Uw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1607878736; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=6LtMuLgFJJOGBJc/m/HfWbpuNt46XrlQDKTr61m6DGA=; b=BYYtg3XI6QxvG7NoOUv62NueotU9O27TN8hCZufTktDoqQ0pzm4K/XrtP/ro9qbbDtyBKlXpkOBfmn/Ikl2Gd75n2PLgQAY7lxgkhZ2zRNJa9F5+UQy2m2Uwar2mW8UPPWcYwy+BEnZM/mE3rMgsDRyVGNZAJYP6FazCO8L7bkw= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1607878736991576.8432912798121; Sun, 13 Dec 2020 08:58:56 -0800 (PST) Received: from localhost ([::1]:53904 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1koUhx-0007TS-NW for importer@patchew.org; Sun, 13 Dec 2020 11:58:53 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:50004) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1koUgl-0005fx-Fo for qemu-devel@nongnu.org; Sun, 13 Dec 2020 11:57:39 -0500 Received: from mailout09.t-online.de ([194.25.134.84]:33800) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1koUgd-0003TA-GY for qemu-devel@nongnu.org; Sun, 13 Dec 2020 11:57:39 -0500 Received: from fwd07.aul.t-online.de (fwd07.aul.t-online.de [172.20.27.150]) by mailout09.t-online.de (Postfix) with SMTP id D0D69423C5AA; Sun, 13 Dec 2020 17:57:29 +0100 (CET) Received: from linpower.localnet (GcvRMUZcZhKrTBzUsBJVk-jgmmWhKrpXd-SM-FuBBTClfTb3J2y5pqnKLVCzw9qwfl@[79.208.17.59]) by fwd07.t-online.de with (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384 encrypted) esmtp id 1koUgb-1XzRVA0; Sun, 13 Dec 2020 17:57:29 +0100 Received: by linpower.localnet (Postfix, from userid 1000) id 13134200617; Sun, 13 Dec 2020 17:57:24 +0100 (CET) From: =?UTF-8?q?Volker=20R=C3=BCmelin?= To: Gerd Hoffmann Subject: [PATCH 3/3] ui/gtk: limit virtual console max update interval Date: Sun, 13 Dec 2020 17:57:24 +0100 Message-Id: <20201213165724.13418-3-vr_qemu@t-online.de> X-Mailer: git-send-email 2.26.2 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ID: GcvRMUZcZhKrTBzUsBJVk-jgmmWhKrpXd-SM-FuBBTClfTb3J2y5pqnKLVCzw9qwfl X-TOI-EXPURGATEID: 150726::1607878649-0000DD00-C02B820D/0/0 CLEAN NORMAL X-TOI-MSGID: e908385c-a7db-4a49-aa7a-57971574208f Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: none client-ip=194.25.134.84; envelope-from=volker.ruemelin@t-online.de; helo=mailout09.t-online.de X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , QEMU , Nikola Pavlica Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Limit the virtual console maximum update interval to GUI_REFRESH_INTERVAL_DEFAULT. This papers over a integer overflow bug in gtk3 on Windows where the reported monitor refresh frequency can be much smaller than the real refresh frequency. The gtk bug report can be found here: https://gitlab.gnome.org/GNOME/gtk/-/issues/3394 On my Windows 10 system gtk reports a monitor refresh rate of 1.511Hz instead of 60.031Hz and slows down the screen update rate in qemu to a crawl. Provided you are affected by the gtk bug on Windows, these are the steps to reproduce the issue: Start qemu with -display gtk and activate all qemu virtual consoles and notice the reduced qemu refresh rate. Activating all virtual consoles is necessary, because gui_update() in ui/console.c uses the minimum of all display change listeners update interval and not yet activated virtual consoles report the default update interval (30ms). Signed-off-by: Volker R=C3=BCmelin --- ui/gtk.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/ui/gtk.c b/ui/gtk.c index 7ff9327b9d..78da5902f4 100644 --- a/ui/gtk.c +++ b/ui/gtk.c @@ -749,10 +749,10 @@ static void gd_resize_event(GtkGLArea *area, #endif =20 /* - * If available, return the refresh rate of the display in milli-Hertz, - * else return 0. + * If available, return the update interval of the monitor in ms, + * else return 0 (the default update interval). */ -static int gd_refresh_rate_millihz(GtkWidget *widget) +static int gd_monitor_update_interval(GtkWidget *widget) { #ifdef GDK_VERSION_3_22 GdkWindow *win =3D gtk_widget_get_window(widget); @@ -760,8 +760,13 @@ static int gd_refresh_rate_millihz(GtkWidget *widget) if (win) { GdkDisplay *dpy =3D gtk_widget_get_display(widget); GdkMonitor *monitor =3D gdk_display_get_monitor_at_window(dpy, win= ); + int refresh_rate =3D gdk_monitor_get_refresh_rate(monitor); /* [mH= z] */ =20 - return gdk_monitor_get_refresh_rate(monitor); + if (refresh_rate) { + /* T =3D 1 / f =3D 1 [s*Hz] / f =3D 1000*1000 [ms*mHz] / f */ + return MIN(1000 * 1000 / refresh_rate, + GUI_REFRESH_INTERVAL_DEFAULT); + } } #endif return 0; @@ -774,7 +779,6 @@ static gboolean gd_draw_event(GtkWidget *widget, cairo_= t *cr, void *opaque) int mx, my; int ww, wh; int fbw, fbh; - int refresh_rate_millihz; =20 #if defined(CONFIG_OPENGL) if (vc->gfx.gls) { @@ -795,12 +799,8 @@ static gboolean gd_draw_event(GtkWidget *widget, cairo= _t *cr, void *opaque) return FALSE; } =20 - refresh_rate_millihz =3D gd_refresh_rate_millihz(vc->window ? - vc->window : s->window); - if (refresh_rate_millihz) { - /* T =3D 1 / f =3D 1 [s*Hz] / f =3D 1000*1000 [ms*mHz] / f */ - vc->gfx.dcl.update_interval =3D 1000 * 1000 / refresh_rate_millihz; - } + vc->gfx.dcl.update_interval =3D + gd_monitor_update_interval(vc->window ? vc->window : s->window); =20 fbw =3D surface_width(vc->gfx.ds); fbh =3D surface_height(vc->gfx.ds); --=20 2.26.2