Use SDL wrapped getenv function
This commit is contained in:
@@ -129,8 +129,8 @@ static SDL_VideoDevice *Wayland_CreateDevice(void)
|
|||||||
struct wl_display *display;
|
struct wl_display *display;
|
||||||
|
|
||||||
/* Are we trying to connect to or are currently in a Wayland session? */
|
/* Are we trying to connect to or are currently in a Wayland session? */
|
||||||
if (!getenv("WAYLAND_DISPLAY")) {
|
if (!SDL_getenv("WAYLAND_DISPLAY")) {
|
||||||
const char *session = getenv("XDG_SESSION_TYPE");
|
const char *session = SDL_getenv("XDG_SESSION_TYPE");
|
||||||
if (session && SDL_strcasecmp(session, "wayland")) {
|
if (session && SDL_strcasecmp(session, "wayland")) {
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user