]> git.proxmox.com Git - mirror_qemu.git/commit
ui/curses: Fix monitor color with -curses when 256 colors
authorOGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Mon, 19 Oct 2015 12:23:10 +0000 (21:23 +0900)
committerGerd Hoffmann <kraxel@redhat.com>
Tue, 3 Nov 2015 09:12:45 +0000 (10:12 +0100)
commit615220ddaf23db4c5686053257c568b46967e4b5
tree64b70925697c9aee0896cc81c3986679bbd16e67
parent3d861a01093f8eedfac9889746ccafcfd32039b7
ui/curses: Fix monitor color with -curses when 256 colors

If TERM=xterm-256color, COLOR_PAIRS==256 and monitor passes chtype
like 0x74xx. Then, the code uses uninitialized color pair. As result,
monitor uses black for both of fg and bg color, i.e. terminal is
filled by black.

To fix, this initialize above than 64 with default color (fg=white,bg=black).

FIXME: on 256 color, curses may be possible better vga color emulation.

Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
ui/curses.c