]> glassweightruler.freedombox.rocks Git - Ventoy.git/blobdiff - INSTALL/grub/grub.cfg
Don't force to use max resolution for VMware/VirtualBox. (#3140)
[Ventoy.git] / INSTALL / grub / grub.cfg
index e867f8aa1f33a9304f98a7cf0e400b7f40660e2f..5b1e300740b0601ae4ee7788e0079e1de510eaeb 100644 (file)
@@ -33,6 +33,23 @@ function ventoy_debug_pause {
     fi
 }
 
+
+function ventoy_max_resolution {
+    #Skip this for VM
+    smbios -t 1 -s 0x05 --set=system_product;
+    for vtPdt in "VMware"  "VirtualBox"; then
+        if vt_str_casebegin "$system_product"  "$vtPdt"; then
+            return
+        fi
+    fi
+
+    vt_enum_video_mode
+    vt_get_video_mode 0 vtCurMode
+    terminal_output console
+    set gfxmode=$vtCurMode
+    terminal_output gfxterm
+}
+
 function ventoy_cli_console {
     if [ -z "$vtoy_display_mode" ]; then
         terminal_output  console
@@ -631,7 +648,7 @@ function uefi_windows_menu_func {
 
     if [ -n "$vtoy_chain_mem_addr" ]; then
         ventoy_acpi_param ${vtoy_chain_mem_addr} 2048
-        ventoy_cli_console
+        ventoy_max_resolution
         chainloader ${vtoy_path}/ventoy_${VTOY_EFI_ARCH}.efi  env_param=${env_param} isoefi=${LoadIsoEfiDriver} iso_${ventoy_fs_probe} ${vtdebug_flag} mem:${vtoy_chain_mem_addr}:size:${vtoy_chain_mem_size}
         boot
     else
@@ -2410,7 +2427,7 @@ function mimg_common_menuentry {
 #############################################################
 #############################################################
 
-set VENTOY_VERSION="1.1.04"
+set VENTOY_VERSION="1.1.05"
 
 #ACPI not compatible with Window7/8, so disable by default
 set VTOY_PARAM_NO_ACPI=1