Skip to content

Commit

Permalink
ui/vc: console-vc requires PIXMAN
Browse files Browse the repository at this point in the history
Add stubs for the fallback paths.

get_vc() now returns NULL by default if !PIXMAN.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
  • Loading branch information
elmarco committed Nov 7, 2023
1 parent 1bec1cc commit 600179c
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 1 deletion.
33 changes: 33 additions & 0 deletions ui/console-vc-stubs.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
/*
* SPDX-License-Identifier: GPL-2.0-or-later
* QEMU VC stubs
*/
#include "qemu/osdep.h"

#include "qapi/error.h"
#include "qemu/error-report.h"
#include "qemu/option.h"
#include "chardev/char.h"
#include "ui/console-priv.h"

void qemu_text_console_select(QemuTextConsole *c)
{
}

const char *
qemu_text_console_get_label(QemuTextConsole *c)
{
return NULL;
}

void qemu_text_console_update_cursor(void)
{
}

void qemu_text_console_handle_keysym(QemuTextConsole *s, int keysym)
{
}

void qemu_console_early_init(void)
{
}
3 changes: 3 additions & 0 deletions ui/console.c
Original file line number Diff line number Diff line change
Expand Up @@ -1685,8 +1685,11 @@ const char *qemu_display_get_vc(DisplayOptions *opts)
if (dpys[opts->type]->vc) {
return dpys[opts->type]->vc;
} else {
#ifdef CONFIG_PIXMAN
return "vc:80Cx24C";
#endif
}
return NULL;
}

void qemu_display_help(void)
Expand Down
2 changes: 1 addition & 1 deletion ui/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ system_ss.add(png)
system_ss.add(files(
'clipboard.c',
'console.c',
'console-vc.c',
'cursor.c',
'input-keymap.c',
'input-legacy.c',
Expand All @@ -19,6 +18,7 @@ system_ss.add(files(
'ui-qmp-cmds.c',
'util.c',
))
system_ss.add(when: pixman, if_true: files('console-vc.c'), if_false: files('console-vc-stubs.c'))
if dbus_display
system_ss.add(files('dbus-module.c'))
endif
Expand Down

0 comments on commit 600179c

Please sign in to comment.