From b7fb49f0c709a406f79372be397367ff2550373b Mon Sep 17 00:00:00 2001 From: Gerd Hoffmann Date: Fri, 13 Mar 2015 12:21:14 +0100 Subject: console: add dpy_ui_info_supported Allow ui code to check whenever the emulated display supports display change notifications. Signed-off-by: Gerd Hoffmann --- ui/console.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'ui') diff --git a/ui/console.c b/ui/console.c index 248dd60..406c36b 100644 --- a/ui/console.c +++ b/ui/console.c @@ -1391,11 +1391,16 @@ static void dpy_set_ui_info_timer(void *opaque) con->hw_ops->ui_info(con->hw, con->head, &con->ui_info); } +bool dpy_ui_info_supported(QemuConsole *con) +{ + return con->hw_ops->ui_info != NULL; +} + int dpy_set_ui_info(QemuConsole *con, QemuUIInfo *info) { assert(con != NULL); con->ui_info = *info; - if (!con->hw_ops->ui_info) { + if (!dpy_ui_info_supported(con)) { return -1; } -- cgit v1.1