Skip to content

Commit

Permalink
wizard: generate valid options for isapc
Browse files Browse the repository at this point in the history
Resolves #4961
  • Loading branch information
osy committed Mar 4, 2023
1 parent 8de800f commit 5a08d0f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Configuration/UTMQemuConfigurationDisplay.swift
Original file line number Diff line number Diff line change
Expand Up @@ -76,12 +76,14 @@ struct UTMQemuConfigurationDisplay: Codable, Identifiable {
extension UTMQemuConfigurationDisplay {
init?(forArchitecture architecture: QEMUArchitecture, target: any QEMUTarget) {
self.init()
if !architecture.hasAgentSupport {
let rawTarget = target.rawValue
if !architecture.hasAgentSupport || rawTarget == "isapc" {
isDynamicResolution = false
}
let rawTarget = target.rawValue
if rawTarget.hasPrefix("pc") || rawTarget.hasPrefix("q35") {
hardware = QEMUDisplayDevice_x86_64.virtio_vga
} else if rawTarget == "isapc" {
hardware = QEMUDisplayDevice_x86_64.isa_vga
} else if rawTarget.hasPrefix("virt-") || rawTarget == "virt" {
hardware = QEMUDisplayDevice_aarch64.virtio_ramfb
} else {
Expand Down
2 changes: 2 additions & 0 deletions Configuration/UTMQemuConfigurationNetwork.swift
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,8 @@ extension UTMQemuConfigurationNetwork {
hardware = QEMUNetworkDevice_x86_64.rtl8139
} else if rawTarget.hasPrefix("q35") {
hardware = QEMUNetworkDevice_x86_64.e1000
} else if rawTarget == "isapc" {
hardware = QEMUNetworkDevice_x86_64.ne2k_isa
} else if rawTarget.hasPrefix("virt-") || rawTarget == "virt" {
hardware = QEMUNetworkDevice_aarch64.virtio_net_pci
} else {
Expand Down

0 comments on commit 5a08d0f

Please sign in to comment.