Use SDL wrapped getenv function

This commit is contained in:
Frank Praznik 2023-10-11 11:23:24 -04:00
parent 044046bc50
commit 9a5f7b17c6
1 changed files with 2 additions and 2 deletions

View File

@ -129,8 +129,8 @@ static SDL_VideoDevice *Wayland_CreateDevice(void)
struct wl_display *display;
/* Are we trying to connect to or are currently in a Wayland session? */
if (!getenv("WAYLAND_DISPLAY")) {
const char *session = getenv("XDG_SESSION_TYPE");
if (!SDL_getenv("WAYLAND_DISPLAY")) {
const char *session = SDL_getenv("XDG_SESSION_TYPE");
if (session && SDL_strcasecmp(session, "wayland")) {
return NULL;
}