mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-10-15 06:16:00 +00:00
SDL_CreateEnvironment() fills the environment with a non-zero parameter
This commit is contained in:
@@ -207,7 +207,7 @@ static void run_zenity(zenityArgs* arg_struct)
|
||||
goto done;
|
||||
}
|
||||
|
||||
env = SDL_CreateEnvironment(SDL_FALSE);
|
||||
env = SDL_CreateEnvironment(true);
|
||||
if (!env) {
|
||||
goto done;
|
||||
}
|
||||
|
@@ -41,7 +41,7 @@ bool SDL_SYS_OpenURL(const char *url)
|
||||
SDL_Process *process = NULL;
|
||||
bool result = false;
|
||||
|
||||
env = SDL_CreateEnvironment(SDL_FALSE);
|
||||
env = SDL_CreateEnvironment(true);
|
||||
if (!env) {
|
||||
goto done;
|
||||
}
|
||||
|
@@ -329,7 +329,7 @@ static SDL_Environment *SDL_environment;
|
||||
SDL_Environment *SDL_GetEnvironment(void)
|
||||
{
|
||||
if (!SDL_environment) {
|
||||
SDL_environment = SDL_CreateEnvironment(false);
|
||||
SDL_environment = SDL_CreateEnvironment(true);
|
||||
}
|
||||
return SDL_environment;
|
||||
}
|
||||
@@ -344,7 +344,7 @@ void SDL_CleanupEnvironment(void)
|
||||
}
|
||||
}
|
||||
|
||||
SDL_Environment *SDL_CreateEnvironment(SDL_bool empty)
|
||||
SDL_Environment *SDL_CreateEnvironment(SDL_bool populated)
|
||||
{
|
||||
SDL_Environment *env = SDL_calloc(1, sizeof(*env));
|
||||
if (!env) {
|
||||
@@ -360,7 +360,7 @@ SDL_Environment *SDL_CreateEnvironment(SDL_bool empty)
|
||||
// Don't fail if we can't create a mutex (e.g. on a single-thread environment)
|
||||
env->lock = SDL_CreateMutex();
|
||||
|
||||
if (!empty) {
|
||||
if (populated) {
|
||||
#ifdef SDL_PLATFORM_WINDOWS
|
||||
LPWCH strings = GetEnvironmentStringsW();
|
||||
if (strings) {
|
||||
|
Reference in New Issue
Block a user