diff --git a/internal/pages/03_vbios_extract.go b/internal/pages/03_vbios_extract.go index 2551dde..0e5a3ba 100644 --- a/internal/pages/03_vbios_extract.go +++ b/internal/pages/03_vbios_extract.go @@ -42,6 +42,7 @@ func genVBIOS_dumper(id string) { // If OK is pressed if choice == "next" { + disableVideo() selectUSB() } else { fmt.Println("") diff --git a/internal/pages/04_disable_video.go b/internal/pages/04_disable_video.go new file mode 100644 index 0000000..23ae8fe --- /dev/null +++ b/internal/pages/04_disable_video.go @@ -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) + } + +} diff --git a/internal/pages/04_select_usbctrl.go b/internal/pages/05_select_usbctrl.go similarity index 100% rename from internal/pages/04_select_usbctrl.go rename to internal/pages/05_select_usbctrl.go