From 9ae19b657ee20f4d03bdca8dbf367b932801ac93 Mon Sep 17 00:00:00 2001 From: Aurelien Jarno Date: Tue, 4 Jan 2011 21:58:24 +0100 Subject: Fix curses on big endian hosts On big endian hosts, the curses interface is unusable: the emulated graphic card only displays garbage, while the monitor interface displays nothing (or rather only spaces). The curses interface is waiting for data in native endianness, so console_write_ch() should not do any conversion. The conversion should be done when reading the video buffer in hw/vga.c. I supposed this buffer is in little endian mode, though it's not impossible that the data is actually in guest endianness. I currently have no big endian guest to way (they all switch to graphic mode immediately). Signed-off-by: Aurelien Jarno --- console.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'console.h') diff --git a/console.h b/console.h index b2fc908..3157330 100644 --- a/console.h +++ b/console.h @@ -329,7 +329,7 @@ static inline void console_write_ch(console_ch_t *dest, uint32_t ch) { if (!(ch & 0xff)) ch |= ' '; - cpu_to_le32wu((uint32_t *) dest, ch); + *dest = ch; } typedef void (*vga_hw_update_ptr)(void *); -- cgit v1.1