mirror of
				https://github.com/oSoWoSo/DistroHopper.git
				synced 2024-08-14 22:46:53 +00:00 
			
		
		
		
	Prefer SDL unless EFI boot is selected, the fallback to GTK
EFI booting doesn't appear to work with SDL and GL enabled.
This commit is contained in:
		
							parent
							
								
									79eb15e7c8
								
							
						
					
					
						commit
						cdb4c12170
					
				
					 1 changed files with 10 additions and 5 deletions
				
			
		
							
								
								
									
										15
									
								
								quickemu.sh
									
										
									
									
									
								
							
							
						
						
									
										15
									
								
								quickemu.sh
									
										
									
									
									
								
							|  | @ -31,11 +31,17 @@ function vm_snapshot() { | ||||||
| 
 | 
 | ||||||
| function vm_boot() { | function vm_boot() { | ||||||
|   local BIOS="" |   local BIOS="" | ||||||
|  |   local GL="on" | ||||||
|  |   local UI="sdl" | ||||||
|   if [ ${ENABLE_EFI} -eq 1 ]; then |   if [ ${ENABLE_EFI} -eq 1 ]; then | ||||||
|     if [ "${ENGINE}" == "virgil" ] && [ -e /snap/qemu-virgil/current/usr/share/qemu/edk2-x86_64-code.fd ] ; then |     if [ "${ENGINE}" == "virgil" ] && [ -e /snap/qemu-virgil/current/usr/share/qemu/edk2-x86_64-code.fd ] ; then | ||||||
|       BIOS="-drive if=pflash,format=raw,readonly,file=/snap/qemu-virgil/current/usr/share/qemu/edk2-x86_64-code.fd" |       BIOS="-drive if=pflash,format=raw,readonly,file=/snap/qemu-virgil/current/usr/share/qemu/edk2-x86_64-code.fd" | ||||||
|  |       GL="off" | ||||||
|  |       UI="gtk" | ||||||
|     elif [ -e /usr/share/qemu/OVMF.fd ]; then |     elif [ -e /usr/share/qemu/OVMF.fd ]; then | ||||||
|       BIOS="-drive if=pflash,format=raw,readonly,file=/usr/share/qemu/OVMF.fd" |       BIOS="-drive if=pflash,format=raw,readonly,file=/usr/share/qemu/OVMF.fd" | ||||||
|  |       GL="off" | ||||||
|  |       UI="gtk" | ||||||
|     else |     else | ||||||
|       echo " - EFI:      Booting requested but no EFI firmware found." |       echo " - EFI:      Booting requested but no EFI firmware found." | ||||||
|       echo "             Booting from Legacy BIOS." |       echo "             Booting from Legacy BIOS." | ||||||
|  | @ -78,16 +84,15 @@ function vm_boot() { | ||||||
|   echo " - RAM:      ${ram}" |   echo " - RAM:      ${ram}" | ||||||
| 
 | 
 | ||||||
|   # Determine what display to use |   # Determine what display to use | ||||||
|   local display="-display gtk,grab-on-hover=on" |   local display="-display ${UI},gl=${GL}" | ||||||
| 
 |  | ||||||
|   local ver=$(qemu-${ENGINE} -version | head -n1 | cut -d' ' -f4 | cut -d'(' -f1) |   local ver=$(qemu-${ENGINE} -version | head -n1 | cut -d' ' -f4 | cut -d'(' -f1) | ||||||
|   if [ "${ENGINE}" == "virgil" ]; then |   if [ "${ver}" == "2.11.1" ]; then | ||||||
|     display="-display sdl,gl=on" |  | ||||||
|   elif [ "${ver}" == "2.11.1" ]; then |  | ||||||
|     display="-display sdl" |     display="-display sdl" | ||||||
|     # Fix stuttering mouse pointer when SDL backend is used. |     # Fix stuttering mouse pointer when SDL backend is used. | ||||||
|     export SDL_VIDEO_X11_DGAMOUSE=0 |     export SDL_VIDEO_X11_DGAMOUSE=0 | ||||||
|   fi |   fi | ||||||
|  |   echo " - UI:       ${UI}" | ||||||
|  |   echo " - GL:       ${GL}" | ||||||
| 
 | 
 | ||||||
|   # TODO: Detect Wayland here and "do the right thing". |   # TODO: Detect Wayland here and "do the right thing". | ||||||
|   # Determine the most suitable 16:9 resolution of for VM based |   # Determine the most suitable 16:9 resolution of for VM based | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue