From b0766612d16da185a822636cf54214123e8038cf Mon Sep 17 00:00:00 2001 From: Gerd Hoffmann Date: Thu, 1 Mar 2018 11:05:38 +0100 Subject: curses: switch over to new display registry Signed-off-by: Gerd Hoffmann Message-id: 20180301100547.18962-5-kraxel@redhat.com --- ui/curses.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'ui') diff --git a/ui/curses.c b/ui/curses.c index 597e47fd4a..59d819fd4d 100644 --- a/ui/curses.c +++ b/ui/curses.c @@ -435,7 +435,7 @@ static const DisplayChangeListenerOps dcl_ops = { .dpy_text_cursor = curses_cursor_position, }; -void curses_display_init(DisplayState *ds, DisplayOptions *opts) +static void curses_display_init(DisplayState *ds, DisplayOptions *opts) { #ifndef _WIN32 if (!isatty(1)) { @@ -456,3 +456,15 @@ void curses_display_init(DisplayState *ds, DisplayOptions *opts) invalidate = 1; } + +static QemuDisplay qemu_display_curses = { + .type = DISPLAY_TYPE_CURSES, + .init = curses_display_init, +}; + +static void register_curses(void) +{ + qemu_display_register(&qemu_display_curses); +} + +type_init(register_curses); -- cgit v1.2.1