Add option to run vms fullscreen

This commit is contained in:
Artur Gurgul 2025-08-15 09:56:42 +02:00
parent f4c62c354c
commit 73e3f7548b

View file

@ -68,7 +68,8 @@ module Qemu
cdrom: nil, cdrom: nil,
detach: true, detach: true,
ram: 2048, ram: 2048,
cpus: 1 cpus: 1,
fullscreen: true
} }
opts = defaults.merge(options) opts = defaults.merge(options)
@ -82,7 +83,12 @@ module Qemu
args += ["-drive", "if=pflash,format=raw,unit=0,readonly=on,file=/opt/homebrew/share/qemu/edk2-aarch64-code.fd"] args += ["-drive", "if=pflash,format=raw,unit=0,readonly=on,file=/opt/homebrew/share/qemu/edk2-aarch64-code.fd"]
#args += ["-device", "virtio-gpu-device"] #args += ["-device", "virtio-gpu-device"]
args += ["-display", "cocoa"] if opts[:fullscreen]
args += ["-display", "cocoa,full-screen=on"]
else
args += ["-display", "cocoa"]
end
args += ["-device", "qemu-xhci,id=xhci"] args += ["-device", "qemu-xhci,id=xhci"]
args += ["-device", "usb-kbd"] args += ["-device", "usb-kbd"]
args += ["-device", "usb-tablet"] args += ["-device", "usb-tablet"]