diff options
author | Peter Maydell | 2015-11-03 11:20:04 +0100 |
---|---|---|
committer | Peter Maydell | 2015-11-03 11:20:04 +0100 |
commit | 130d0bc6594d0cc6591d00312841891b3c187b07 (patch) | |
tree | a1082905a667d8aab9296beef46a9ce48f6b478e /include/ui | |
parent | Merge remote-tracking branch 'remotes/armbru/tags/pull-qapi-2015-11-02' into ... (diff) | |
parent | vnc: fix bug: vnc server can't start when 'to' is specified (diff) | |
download | qemu-130d0bc6594d0cc6591d00312841891b3c187b07.tar.gz qemu-130d0bc6594d0cc6591d00312841891b3c187b07.tar.xz qemu-130d0bc6594d0cc6591d00312841891b3c187b07.zip |
Merge remote-tracking branch 'remotes/kraxel/tags/pull-ui-20151103-1' into staging
ui: fixes for vnc, opengl and curses.
# gpg: Signature made Tue 03 Nov 2015 09:53:24 GMT using RSA key ID D3E87138
# gpg: Good signature from "Gerd Hoffmann (work) <kraxel@redhat.com>"
# gpg: aka "Gerd Hoffmann <gerd@kraxel.org>"
# gpg: aka "Gerd Hoffmann (private) <kraxel@gmail.com>"
* remotes/kraxel/tags/pull-ui-20151103-1:
vnc: fix bug: vnc server can't start when 'to' is specified
vnc: allow fall back to RAW encoding
ui/opengl: Reduce build required libraries for opengl
ui/curses: Fix pageup/pagedown on -curses
ui/curses: Support line graphics chars on -curses mode
ui/curses: Fix monitor color with -curses when 256 colors
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'include/ui')
-rw-r--r-- | include/ui/console.h | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/include/ui/console.h b/include/ui/console.h index d887f911f3..c249db4f7c 100644 --- a/include/ui/console.h +++ b/include/ui/console.h @@ -321,13 +321,23 @@ static inline pixman_format_code_t surface_format(DisplaySurface *s) #ifdef CONFIG_CURSES #include <curses.h> typedef chtype console_ch_t; +extern chtype vga_to_curses[]; #else typedef unsigned long console_ch_t; #endif static inline void console_write_ch(console_ch_t *dest, uint32_t ch) { - if (!(ch & 0xff)) + uint8_t c = ch; +#ifdef CONFIG_CURSES + if (vga_to_curses[c]) { + ch &= ~(console_ch_t)0xff; + ch |= vga_to_curses[c]; + } +#else + if (c == '\0') { ch |= ' '; + } +#endif *dest = ch; } |