[client] wayland: fix early return preventing signal being set

This commit is contained in:
Geoffrey McRae 2021-01-16 20:45:29 +11:00
parent 9f74bb785e
commit ca5fc80af5

View File

@ -257,9 +257,8 @@ static const struct wl_seat_listener seatListener = {
static bool waylandEarlyInit(void)
{
if (getenv("SDL_VIDEODRIVER") != NULL)
return true;
if (!getenv("SDL_VIDEODRIVER"))
{
int err = setenv("SDL_VIDEODRIVER", "wayland", 1);
if (err < 0)
{
@ -267,6 +266,7 @@ static bool waylandEarlyInit(void)
return false;
}
DEBUG_INFO("SDL_VIDEODRIVER has been set to wayland");
}
// Request to receive EPIPE instead of SIGPIPE when one end of a pipe
// disconnects while a write is pending. This is useful to the Wayland