mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-08 10:13:56 -06:00
macfb: add qdev property to specify display type
Since the available resolutions and colour depths are determined by the attached display type, add a qdev property to allow the display type to be specified. The main resolutions of interest are high resolution 1152x870 with 8-bit colour and SVGA resolution up to 800x600 with 24-bit colour so update the q800 machine to allow high resolution mode if specified and otherwise fall back to SVGA. Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by: Laurent Vivier <laurent@vivier.eu> Message-Id: <20211007221253.29024-9-mark.cave-ayland@ilande.co.uk> Signed-off-by: Laurent Vivier <laurent@vivier.eu>
This commit is contained in:
parent
e6108b9636
commit
4317c51861
3 changed files with 12 additions and 1 deletions
|
@ -421,6 +421,11 @@ static void q800_init(MachineState *machine)
|
|||
qdev_prop_set_uint32(dev, "width", graphic_width);
|
||||
qdev_prop_set_uint32(dev, "height", graphic_height);
|
||||
qdev_prop_set_uint8(dev, "depth", graphic_depth);
|
||||
if (graphic_width == 1152 && graphic_height == 870 && graphic_depth == 8) {
|
||||
qdev_prop_set_uint8(dev, "display", MACFB_DISPLAY_APPLE_21_COLOR);
|
||||
} else {
|
||||
qdev_prop_set_uint8(dev, "display", MACFB_DISPLAY_VGA);
|
||||
}
|
||||
qdev_realize_and_unref(dev, BUS(nubus), &error_fatal);
|
||||
|
||||
cs = CPU(cpu);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue