mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
Adding support for SDL fullscreen option
* src/domain_conf.c src/domain_conf.h src/qemu_conf.c tests/qemuxml2argvtest.c tests/qemuxml2xmltest.c tests/qemuxml2argvdata/qemuxml2argv-graphics-sdl-fullscreen.args tests/qemuxml2argvdata/qemuxml2argv-graphics-sdl-fullscreen.xml: slightly modified patch for SDL fullscreen from Itamar Heim * docs/formatdomain.html docs/formatdomain.html.in docs/libvirt.rng: update the schemas and docs about the sdl graphic element attributes * AUTHORS: add Itamar Heim Daniel
This commit is contained in:
@@ -1401,6 +1401,22 @@ virDomainGraphicsDefParseXML(virConnectPtr conn,
|
||||
def->data.vnc.passwd = virXMLPropString(node, "passwd");
|
||||
def->data.vnc.keymap = virXMLPropString(node, "keymap");
|
||||
} else if (def->type == VIR_DOMAIN_GRAPHICS_TYPE_SDL) {
|
||||
char *fullscreen = virXMLPropString(node, "fullscreen");
|
||||
|
||||
if (fullscreen != NULL) {
|
||||
if (STREQ(fullscreen, "yes")) {
|
||||
def->data.sdl.fullscreen = 1;
|
||||
} else if (STREQ(fullscreen, "no")) {
|
||||
def->data.sdl.fullscreen = 0;
|
||||
} else {
|
||||
virDomainReportError(conn, VIR_ERR_INTERNAL_ERROR,
|
||||
_("unknown fullscreen value '%s'"), fullscreen);
|
||||
VIR_FREE(fullscreen);
|
||||
goto error;
|
||||
}
|
||||
VIR_FREE(fullscreen);
|
||||
} else
|
||||
def->data.sdl.fullscreen = 0;
|
||||
def->data.sdl.xauth = virXMLPropString(node, "xauth");
|
||||
def->data.sdl.display = virXMLPropString(node, "display");
|
||||
}
|
||||
@@ -2951,6 +2967,9 @@ virDomainGraphicsDefFormat(virConnectPtr conn,
|
||||
if (def->data.sdl.xauth)
|
||||
virBufferEscapeString(buf, " xauth='%s'",
|
||||
def->data.sdl.xauth);
|
||||
if (def->data.sdl.fullscreen)
|
||||
virBufferAddLit(buf, " fullscreen='yes'");
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
@@ -268,6 +268,7 @@ struct _virDomainGraphicsDef {
|
||||
struct {
|
||||
char *display;
|
||||
char *xauth;
|
||||
int fullscreen;
|
||||
} sdl;
|
||||
} data;
|
||||
};
|
||||
|
||||
@@ -1229,6 +1229,8 @@ int qemudBuildCommandLine(virConnectPtr conn,
|
||||
ADD_ENV(xauth);
|
||||
if (display)
|
||||
ADD_ENV(display);
|
||||
if (vm->def->graphics->data.sdl.fullscreen)
|
||||
ADD_ARG_LIT("-full-screen");
|
||||
}
|
||||
|
||||
/* Add sound hardware */
|
||||
|
||||
Reference in New Issue
Block a user