add disable vfio video

This commit is contained in:
HikariKnight 2023-10-29 06:34:42 +01:00
parent 578c958c86
commit e3e660a69a
3 changed files with 36 additions and 0 deletions

View file

@ -42,6 +42,7 @@ func genVBIOS_dumper(id string) {
// If OK is pressed // If OK is pressed
if choice == "next" { if choice == "next" {
disableVideo()
selectUSB() selectUSB()
} else { } else {
fmt.Println("") fmt.Println("")

View file

@ -0,0 +1,35 @@
package pages
import (
"fmt"
"github.com/HikariKnight/quickpassthrough/internal/configs"
"github.com/HikariKnight/quickpassthrough/pkg/command"
"github.com/HikariKnight/quickpassthrough/pkg/menu"
)
func disableVideo() {
// Clear the screen
command.Clear()
// Get our config struct
//config := configs.GetConfig()
fmt.Print(
"Disabling video output in Linux for the card you want to use in a VM\n",
"will make it easier to successfully do the passthrough without issues.\n",
"\n",
)
// Make the yesno menu
choice := menu.YesNo("Do you want to force disable video output in linux on this card?")
if choice == "Yes" {
// Add disable VFIO video to the config
configs.DisableVFIOVideo(1)
} else {
// Do not disable VFIO Video
configs.DisableVFIOVideo(0)
}
}