diff options
author | Alexander Kanavin <alex.kanavin@gmail.com> | 2020-05-08 22:21:10 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2020-05-12 15:19:56 +0100 |
commit | 73b75f5ff6c0b5333898fa340f4d9e2e5111fdef (patch) | |
tree | 490c7bba40a66bea0b34c51db531d38b46f850b4 /scripts/runqemu | |
parent | 308206a1d2dad33ba70a1461e7e101eaea0e1675 (diff) | |
download | openembedded-core-contrib-73b75f5ff6c0b5333898fa340f4d9e2e5111fdef.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.
Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/runqemu')
-rwxr-xr-x | scripts/runqemu | 3 |
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): logger.setLevel(logging.ERROR) sys.argv.remove(quiet) + if 'gl' not in sys.argv[1:] and 'gl-es' not in sys.argv[1:]: + os.environ['SDL_RENDER_DRIVER'] = 'software' + unknown_arg = "" for arg in sys.argv[1:]: if arg in self.fstypes + self.vmtypes + self.wictypes: |