pmb.qemu: simplify --display by introducing --no-gl (!1886)
At the moment, the --display argument is a bit complicated to use. A common use would be to switch between the UIs (sdl, gtk, none) or to enable the software rasterizer. Split the two use cases to separate arguments to make it more intuitive.
This commit is contained in:
parent
d1f5753c89
commit
32dca18eb6
|
@ -126,9 +126,12 @@ def arguments_qemu(subparser):
|
||||||
ret.add_argument("--flavor", help="name of the kernel flavor (run 'pmbootstrap flasher list_flavors'"
|
ret.add_argument("--flavor", help="name of the kernel flavor (run 'pmbootstrap flasher list_flavors'"
|
||||||
" to get a list of all installed flavors")
|
" to get a list of all installed flavors")
|
||||||
|
|
||||||
ret.add_argument("--display", dest="qemu_display", const="sdl,gl=on",
|
ret.add_argument("--display", dest="qemu_display", choices=["sdl", "gtk", "none"],
|
||||||
help="QEMU's display parameter (default: sdl,gl=on)",
|
help="QEMU's display parameter (default: sdl,gl=on)",
|
||||||
default="sdl,gl=on", nargs="?")
|
default="sdl", nargs="?")
|
||||||
|
ret.add_argument("--no-gl", dest="qemu_gl", default=True, action='store_false',
|
||||||
|
help="Avoid using GL for accelerating graphics in QEMU "
|
||||||
|
"(use software rasterizer, slow!)")
|
||||||
|
|
||||||
ret.add_argument("--audio", dest="qemu_audio", choices=["alsa", "pa", "sdl"],
|
ret.add_argument("--audio", dest="qemu_audio", choices=["alsa", "pa", "sdl"],
|
||||||
help="QEMU's audio backend (default: none)",
|
help="QEMU's audio backend (default: none)",
|
||||||
|
|
|
@ -177,7 +177,11 @@ def command_qemu(args, arch, device, img_path):
|
||||||
else:
|
else:
|
||||||
logging.info("WARNING: QEMU is not using KVM and will run slower!")
|
logging.info("WARNING: QEMU is not using KVM and will run slower!")
|
||||||
|
|
||||||
command += ["-display", args.qemu_display]
|
display = args.qemu_display
|
||||||
|
if display != "none":
|
||||||
|
display += ",gl=" + ("on" if args.qemu_gl else "off")
|
||||||
|
|
||||||
|
command += ["-display", display]
|
||||||
|
|
||||||
# Audio support
|
# Audio support
|
||||||
if args.qemu_audio:
|
if args.qemu_audio:
|
||||||
|
|
Loading…
Reference in New Issue