summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorAlexander Kanavin <alex.kanavin@gmail.com>2020-05-08 22:21:10 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2020-05-12 15:20:42 +0100
commitcfa1424b3c9f858bde0be2603b9c19aecbb56ceb (patch)
treef46014c0afe6b1d00f7abda8154647c85bb6246b /scripts
parente063a3924aa0f97357a1b150a8f03e5a2821afe6 (diff)
downloadpoky-cfa1424b3c9f858bde0be2603b9c19aecbb56ceb.tar.gz
runqemu: force software x11 renderer for SDL when GL is not in use
If libsdl is configured with opengl enabled, it will try to use GL renderers to open a window even if qemu doesn't use virgl. Setting the environment variable forces a software X11 renderer, which is the same one used when libsdl has opengl switched off. This avoids needlessly loading the GL libraries and drivers from the host. (From OE-Core rev: 73b75f5ff6c0b5333898fa340f4d9e2e5111fdef) Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/runqemu3
1 files changed, 3 insertions, 0 deletions
diff --git a/scripts/runqemu b/scripts/runqemu
index 7eb7a9c7b4..21680b49d2 100755
--- a/scripts/runqemu
+++ b/scripts/runqemu
@@ -448,6 +448,9 @@ class BaseConfig(object):
448 logger.setLevel(logging.ERROR) 448 logger.setLevel(logging.ERROR)
449 sys.argv.remove(quiet) 449 sys.argv.remove(quiet)
450 450
451 if 'gl' not in sys.argv[1:] and 'gl-es' not in sys.argv[1:]:
452 os.environ['SDL_RENDER_DRIVER'] = 'software'
453
451 unknown_arg = "" 454 unknown_arg = ""
452 for arg in sys.argv[1:]: 455 for arg in sys.argv[1:]:
453 if arg in self.fstypes + self.vmtypes + self.wictypes: 456 if arg in self.fstypes + self.vmtypes + self.wictypes: