]> granicus.if.org Git - nethack/commit
Use 8 bit mode if available
authorRay Chason <ray.chason@protonmail.com>
Sat, 25 Jan 2020 18:38:02 +0000 (13:38 -0500)
committerPasi Kallinen <paxed@alt.org>
Mon, 27 Jan 2020 07:54:58 +0000 (09:54 +0200)
commitc0d1c4efb7e10ecdfd50f9b3f315232a78c5dbc1
treec32d3ae6f147f36e69eac216e29f0d7a70af2093
parentc911446188ce049d7cb6301cfca1a8abd0746627
Use 8 bit mode if available

This was not previously done because the palette was not correctly set
up, and QEMU gave incorrect colors. The palette setup function now
falls back to the standard BIOS function if the VESA BIOS function
fails, which resolves the issue with QEMU. The mode selection logic now
favors 8 bit color if the tile set is compatible.

Using 8 bit mode means fewer writes to memory and fewer uses of the
BIOS window function.
sys/msdos/vidvesa.c