From: Julio Faracco <jcfaracco(a)gmail.com>
Now, QEMU command line can define 'xres' and 'yres' if XML contains both
properties from video model. This is generetaed if resolution was set.
Code let QEMU handle if video model supports this feature.
Signed-off-by: Julio Faracco <jcfaracco(a)gmail.com>
---
src/qemu/qemu_command.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
index cbf25d5f07..99b43243e3 100644
--- a/src/qemu/qemu_command.c
+++ b/src/qemu/qemu_command.c
@@ -4596,6 +4596,11 @@ qemuBuildDeviceVideoStr(const virDomainDef *def,
virBufferAsprintf(&buf, ",vgamem=%uk", video->vram);
}
+ if (video->res && video->res->x && video->res->y) {
+ /* QEMU accepts resolution xres and yres. */
+ virBufferAsprintf(&buf, ",xres=%u,yres=%u", video->res->x,
video->res->y);
+ }
+
if (qemuBuildDeviceAddressStr(&buf, def, &video->info, qemuCaps) < 0)
return NULL;
--
2.20.1