提交 b7fb49f0 编写于 作者: G Gerd Hoffmann

console: add dpy_ui_info_supported

Allow ui code to check whenever the emulated
display supports display change notifications.
Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
上级 cf1ecc82
......@@ -228,6 +228,7 @@ void update_displaychangelistener(DisplayChangeListener *dcl,
uint64_t interval);
void unregister_displaychangelistener(DisplayChangeListener *dcl);
bool dpy_ui_info_supported(QemuConsole *con);
int dpy_set_ui_info(QemuConsole *con, QemuUIInfo *info);
void dpy_gfx_update(QemuConsole *con, int x, int y, int w, int h);
......
......@@ -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;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册