Fix curses on big endian hosts
authorAurelien Jarno <aurelien@aurel32.net>
Tue, 4 Jan 2011 20:58:24 +0000 (21:58 +0100)
committerAurelien Jarno <aurelien@aurel32.net>
Tue, 4 Jan 2011 20:58:24 +0000 (21:58 +0100)
commit666fa0817d6bb42166d382be41af05391b05cf8a
treea589f32a77453e19979a42abceab9dd6356ac528
parent9a73d451e67451a8cc627337754a3583a8798128
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 <aurelien@aurel32.net>
console.h
hw/vga.c