mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 15:53:54 -06:00
curses: fix garbling when chtype != long
Qemu currently assumes that chtype is typedef'd to unsigned long, but this is not necessarily the case (ncurses, for instance, can configure this at build-time). This patch uses the predefined chtype if qemu is configured for curses support and falls back to unsigned long otherwise. Fixes bug 568614. Signed-off-by: Devin J. Pohly <djpohly+launchpad@gmail.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
This commit is contained in:
parent
3b86b13ab0
commit
df00bed0fa
2 changed files with 7 additions and 0 deletions
|
@ -328,7 +328,12 @@ static inline int ds_get_bytes_per_pixel(DisplayState *ds)
|
|||
return ds->surface->pf.bytes_per_pixel;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_CURSES
|
||||
#include <curses.h>
|
||||
typedef chtype console_ch_t;
|
||||
#else
|
||||
typedef unsigned long console_ch_t;
|
||||
#endif
|
||||
static inline void console_write_ch(console_ch_t *dest, uint32_t ch)
|
||||
{
|
||||
if (!(ch & 0xff))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue