Commit 3893c124e7b768d7e7e6cd9933df77e6dbf0816f
1 parent
27463101
Change the way video graphics adapter is selected
Instead of having (current)three command line switches -std-vga, -cirrusvga and -vmwarevga, provide one -vga switch which takes an argument, so that: qemu -std-vga becomes qemu -vga std qemu -cirrusvga becomes qemu -vga cirrus qemu -vmwarevga becomes qemu -vga vmware Update documentation accordingly. git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5335 c046a42c-6fe2-441c-8c8c-71466251a162
Showing
2 changed files
with
45 additions
and
24 deletions
qemu-doc.texi
... | ... | @@ -955,11 +955,24 @@ images. |
955 | 955 | @item -L path |
956 | 956 | Set the directory for the BIOS, VGA BIOS and keymaps. |
957 | 957 | |
958 | -@item -std-vga | |
959 | -Simulate a standard VGA card with Bochs VBE extensions (default is | |
960 | -Cirrus Logic GD5446 PCI VGA). If your guest OS supports the VESA 2.0 | |
961 | -VBE extensions (e.g. Windows XP) and if you want to use high | |
962 | -resolution modes (>= 1280x1024x16) then you should use this option. | |
958 | +@item -vga @var{type} | |
959 | +Select type of VGA card to emulate. Valid values for @var{type} are | |
960 | +@table @code | |
961 | +@item cirrus | |
962 | +Cirrus Logic GD5446 Video card. All Windows versions starting from | |
963 | +Windows 95 should recognize and use this graphic card. For optimal | |
964 | +performances, use 16 bit color depth in the guest and the host OS. | |
965 | +(This one is the default) | |
966 | +@item std | |
967 | +Standard VGA card with Bochs VBE extensions. If your guest OS | |
968 | +supports the VESA 2.0 VBE extensions (e.g. Windows XP) and if you want | |
969 | +to use high resolution modes (>= 1280x1024x16) then you should use | |
970 | +this option. | |
971 | +@item vmware | |
972 | +VMWare SVGA-II compatible adapter. Use it if you have sufficiently | |
973 | +recent XFree86/XOrg server or Windows guest with a driver for this | |
974 | +card. | |
975 | +@end table | |
963 | 976 | |
964 | 977 | @item -no-acpi |
965 | 978 | Disable ACPI (Advanced Configuration and Power Interface) support. Use | ... | ... |
vl.c
... | ... | @@ -7691,6 +7691,8 @@ static void help(int exitcode) |
7691 | 7691 | " use -soundhw ? to get the list of supported cards\n" |
7692 | 7692 | " use -soundhw all to enable all of them\n" |
7693 | 7693 | #endif |
7694 | + "-vga [std|cirrus|vmware]\n" | |
7695 | + " select video card type\n" | |
7694 | 7696 | "-localtime set the real time clock to local time [default=utc]\n" |
7695 | 7697 | "-full-screen start in full screen\n" |
7696 | 7698 | #ifdef TARGET_I386 |
... | ... | @@ -7769,8 +7771,6 @@ static void help(int exitcode) |
7769 | 7771 | "-no-kqemu disable KQEMU kernel module usage\n" |
7770 | 7772 | #endif |
7771 | 7773 | #ifdef TARGET_I386 |
7772 | - "-std-vga simulate a standard VGA card with VESA Bochs Extensions\n" | |
7773 | - " (default is CL-GD5446 PCI VGA)\n" | |
7774 | 7774 | "-no-acpi disable ACPI\n" |
7775 | 7775 | #endif |
7776 | 7776 | #ifdef CONFIG_CURSES |
... | ... | @@ -7861,10 +7861,8 @@ enum { |
7861 | 7861 | QEMU_OPTION_bios, |
7862 | 7862 | QEMU_OPTION_k, |
7863 | 7863 | QEMU_OPTION_localtime, |
7864 | - QEMU_OPTION_cirrusvga, | |
7865 | - QEMU_OPTION_vmsvga, | |
7866 | 7864 | QEMU_OPTION_g, |
7867 | - QEMU_OPTION_std_vga, | |
7865 | + QEMU_OPTION_vga, | |
7868 | 7866 | QEMU_OPTION_echr, |
7869 | 7867 | QEMU_OPTION_monitor, |
7870 | 7868 | QEMU_OPTION_serial, |
... | ... | @@ -7966,7 +7964,7 @@ const QEMUOption qemu_options[] = { |
7966 | 7964 | { "g", 1, QEMU_OPTION_g }, |
7967 | 7965 | #endif |
7968 | 7966 | { "localtime", 0, QEMU_OPTION_localtime }, |
7969 | - { "std-vga", 0, QEMU_OPTION_std_vga }, | |
7967 | + { "vga", HAS_ARG, QEMU_OPTION_vga }, | |
7970 | 7968 | { "echr", HAS_ARG, QEMU_OPTION_echr }, |
7971 | 7969 | { "monitor", HAS_ARG, QEMU_OPTION_monitor }, |
7972 | 7970 | { "serial", HAS_ARG, QEMU_OPTION_serial }, |
... | ... | @@ -7990,8 +7988,6 @@ const QEMUOption qemu_options[] = { |
7990 | 7988 | |
7991 | 7989 | /* temporary options */ |
7992 | 7990 | { "usb", 0, QEMU_OPTION_usb }, |
7993 | - { "cirrusvga", 0, QEMU_OPTION_cirrusvga }, | |
7994 | - { "vmwarevga", 0, QEMU_OPTION_vmsvga }, | |
7995 | 7991 | { "no-acpi", 0, QEMU_OPTION_no_acpi }, |
7996 | 7992 | { "no-reboot", 0, QEMU_OPTION_no_reboot }, |
7997 | 7993 | { "no-shutdown", 0, QEMU_OPTION_no_shutdown }, |
... | ... | @@ -8189,6 +8185,27 @@ static void select_soundhw (const char *optarg) |
8189 | 8185 | } |
8190 | 8186 | #endif |
8191 | 8187 | |
8188 | +static void select_vgahw (const char *p) | |
8189 | +{ | |
8190 | + const char *opts; | |
8191 | + | |
8192 | + if (strstart(p, "std", &opts)) { | |
8193 | + cirrus_vga_enabled = 0; | |
8194 | + vmsvga_enabled = 0; | |
8195 | + } else if (strstart(p, "cirrus", &opts)) { | |
8196 | + cirrus_vga_enabled = 1; | |
8197 | + vmsvga_enabled = 0; | |
8198 | + } else if (strstart(p, "vmware", &opts)) { | |
8199 | + cirrus_vga_enabled = 0; | |
8200 | + vmsvga_enabled = 1; | |
8201 | + } else { | |
8202 | + invalid_vga: | |
8203 | + fprintf(stderr, "Unknown vga type: %s\n", p); | |
8204 | + exit(1); | |
8205 | + } | |
8206 | + if (*opts) goto invalid_vga; | |
8207 | +} | |
8208 | + | |
8192 | 8209 | #ifdef _WIN32 |
8193 | 8210 | static BOOL WINAPI qemu_ctrl_handler(DWORD type) |
8194 | 8211 | { |
... | ... | @@ -8652,17 +8669,8 @@ int main(int argc, char **argv) |
8652 | 8669 | case QEMU_OPTION_localtime: |
8653 | 8670 | rtc_utc = 0; |
8654 | 8671 | break; |
8655 | - case QEMU_OPTION_cirrusvga: | |
8656 | - cirrus_vga_enabled = 1; | |
8657 | - vmsvga_enabled = 0; | |
8658 | - break; | |
8659 | - case QEMU_OPTION_vmsvga: | |
8660 | - cirrus_vga_enabled = 0; | |
8661 | - vmsvga_enabled = 1; | |
8662 | - break; | |
8663 | - case QEMU_OPTION_std_vga: | |
8664 | - cirrus_vga_enabled = 0; | |
8665 | - vmsvga_enabled = 0; | |
8672 | + case QEMU_OPTION_vga: | |
8673 | + select_vgahw (optarg); | |
8666 | 8674 | break; |
8667 | 8675 | case QEMU_OPTION_g: |
8668 | 8676 | { | ... | ... |