mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-09-30 15:08:31 +00:00
Re-added SDL_getenv() as a thread-safe getenv() implementation
This commit is contained in:
@@ -85,8 +85,8 @@ bool Wayland_ShowMessageBox(const SDL_MessageBoxData *messageboxdata, int *butto
|
||||
SDL_Process *process;
|
||||
|
||||
// Are we trying to connect to or are currently in a Wayland session?
|
||||
if (!SDL_GetEnvironmentVariable(SDL_GetEnvironment(), "WAYLAND_DISPLAY")) {
|
||||
const char *session = SDL_GetEnvironmentVariable(SDL_GetEnvironment(), "XDG_SESSION_TYPE");
|
||||
if (!SDL_getenv("WAYLAND_DISPLAY")) {
|
||||
const char *session = SDL_getenv("XDG_SESSION_TYPE");
|
||||
if (session && SDL_strcasecmp(session, "wayland") != 0) {
|
||||
return SDL_SetError("Not on a wayland display");
|
||||
}
|
||||
|
Reference in New Issue
Block a user