summaryrefslogtreecommitdiffstats
path: root/ui/sdl2.c
diff options
context:
space:
mode:
authorPeter Maydell2021-08-10 15:00:39 +0200
committerPeter Maydell2021-08-10 15:00:39 +0200
commit02b8aeede2c61530b137bdb63cf7c998bae657f9 (patch)
treebc4bccd55df995e6c76298dfcbff958ca46292a0 /ui/sdl2.c
parentMerge remote-tracking branch 'remotes/mdroth/tags/qga-pull-2021-08-09-tag' in... (diff)
parentui/sdl2: Check return value from g_setenv() (diff)
downloadqemu-02b8aeede2c61530b137bdb63cf7c998bae657f9.tar.gz
qemu-02b8aeede2c61530b137bdb63cf7c998bae657f9.tar.xz
qemu-02b8aeede2c61530b137bdb63cf7c998bae657f9.zip
Merge remote-tracking branch 'remotes/kraxel/tags/fixes-20210810-pull-request' into staging
fixes for gtk, sdl and audio live migration. # gpg: Signature made Tue 10 Aug 2021 13:18:30 BST # gpg: using RSA key A0328CFFB93A17A79901FE7D4CB6D8EED3E87138 # gpg: Good signature from "Gerd Hoffmann (work) <kraxel@redhat.com>" [full] # gpg: aka "Gerd Hoffmann <gerd@kraxel.org>" [full] # gpg: aka "Gerd Hoffmann (private) <kraxel@gmail.com>" [full] # Primary key fingerprint: A032 8CFF B93A 17A7 9901 FE7D 4CB6 D8EE D3E8 7138 * remotes/kraxel/tags/fixes-20210810-pull-request: ui/sdl2: Check return value from g_setenv() audio: Never send migration section ui/gtk: retry sending VTE console input Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'ui/sdl2.c')
-rw-r--r--ui/sdl2.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/ui/sdl2.c b/ui/sdl2.c
index 36d9010cb6..17c0ec30eb 100644
--- a/ui/sdl2.c
+++ b/ui/sdl2.c
@@ -817,7 +817,10 @@ static void sdl2_display_init(DisplayState *ds, DisplayOptions *o)
* This is a bit hackish but saves us from bigger problem.
* Maybe it's a good idea to fix this in SDL instead.
*/
- g_setenv("SDL_VIDEODRIVER", "x11", 0);
+ if (!g_setenv("SDL_VIDEODRIVER", "x11", 0)) {
+ fprintf(stderr, "Could not set SDL_VIDEODRIVER environment variable\n");
+ exit(1);
+ }
#endif
if (SDL_Init(SDL_INIT_VIDEO)) {