aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--hw/display/macfb.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/hw/display/macfb.c b/hw/display/macfb.c
index 7371986480..2f8e016566 100644
--- a/hw/display/macfb.c
+++ b/hw/display/macfb.c
@@ -655,6 +655,14 @@ static bool macfb_common_realize(DeviceState *dev, MacfbState *s, Error **errp)
return false;
}
+ /*
+ * Set mode control registers to match the mode found above so that
+ * macfb_mode_write() does the right thing if no MacOS toolbox ROM
+ * is present to initialise them
+ */
+ s->regs[DAFB_MODE_CTRL1 >> 2] = s->mode->mode_ctrl1;
+ s->regs[DAFB_MODE_CTRL2 >> 2] = s->mode->mode_ctrl2;
+
s->con = graphic_console_init(dev, 0, &macfb_ops, s);
surface = qemu_console_surface(s->con);