Re-added SDL_getenv() as a thread-safe getenv() implementation

This commit is contained in:
Sam Lantinga
2024-09-15 09:16:30 -07:00
parent 718845a33d
commit 28b94c4758
28 changed files with 374 additions and 359 deletions

View File

@@ -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");
}