diff options
author | Erico Nunes <ernunes@redhat.com> | 2023-03-01 15:12:05 +0100 |
---|---|---|
committer | Marc-André Lureau <marcandre.lureau@redhat.com> | 2023-03-21 11:25:31 +0400 |
commit | 9b6611f40b08e255e28ebc615c64df0252dacbb8 (patch) | |
tree | 99e92b0e94030070d41c43189c56d3d5637613cd /ui | |
parent | 3c293a46627063eb4b12d808c7ec43b1cff8e463 (diff) | |
download | qemu-9b6611f40b08e255e28ebc615c64df0252dacbb8.zip qemu-9b6611f40b08e255e28ebc615c64df0252dacbb8.tar.gz qemu-9b6611f40b08e255e28ebc615c64df0252dacbb8.tar.bz2 |
ui/sdl2: remove workaround forcing x11
This workaround was put in place in the original implementation almost
10 years ago, considering a very old SDL2 version. Currently it prevents
users to run in a wayland-only environment without manually forcing the
backend.
The SDL2 wayland backend has been supported by distributions for a very
long time (e.g. in Fedora, first available 8 years ago), and is now
considered stable and becoming the default for new SDL2 releases.
Instead of requiring the x11 backend to exist by default, let new qemu
releases run with the default chosen by the installed SDL2 version.
Signed-off-by: Erico Nunes <ernunes@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <20230301141205.514338-1-ernunes@redhat.com>
Diffstat (limited to 'ui')
-rw-r--r-- | ui/sdl2.c | 16 |
1 files changed, 0 insertions, 16 deletions
@@ -843,22 +843,6 @@ static void sdl2_display_init(DisplayState *ds, DisplayOptions *o) assert(o->type == DISPLAY_TYPE_SDL); -#ifdef __linux__ - /* on Linux, SDL may use fbcon|directfb|svgalib when run without - * accessible $DISPLAY to open X11 window. This is often the case - * when qemu is run using sudo. But in this case, and when actually - * run in X11 environment, SDL fights with X11 for the video card, - * making current display unavailable, often until reboot. - * So make x11 the default SDL video driver if this variable is unset. - * This is a bit hackish but saves us from bigger problem. - * Maybe it's a good idea to fix this in SDL instead. - */ - if (!g_setenv("SDL_VIDEODRIVER", "x11", 0)) { - fprintf(stderr, "Could not set SDL_VIDEODRIVER environment variable\n"); - exit(1); - } -#endif - if (SDL_GetHintBoolean("QEMU_ENABLE_SDL_LOGGING", SDL_FALSE)) { SDL_LogSetAllPriority(SDL_LOG_PRIORITY_VERBOSE); } |