mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-09-22 11:18:14 +00:00
Fixed bug 3917 - Android, issues with getManifestEnvironmentVariable
We're going to push the manifest environment variables from the Java side instead of continually querying for them from the native side.
This commit is contained in:
@@ -171,23 +171,17 @@ SDL_setenv(const char *name, const char *value, int overwrite)
|
||||
#endif
|
||||
|
||||
/* Retrieve a variable named "name" from the environment */
|
||||
#if defined(HAVE_GETENV)
|
||||
char *
|
||||
SDL_getenv(const char *name)
|
||||
{
|
||||
#if defined(__ANDROID__)
|
||||
char *
|
||||
SDL_getenv(const char *name)
|
||||
{
|
||||
/* Input validation */
|
||||
if (!name || SDL_strlen(name)==0) {
|
||||
return NULL;
|
||||
}
|
||||
/* Make sure variables from the application manifest are available */
|
||||
Android_JNI_GetManifestEnvironmentVariables();
|
||||
#endif
|
||||
|
||||
return SDL_AndroidGetManifestEnvironmentVariable(name);
|
||||
}
|
||||
#elif defined(HAVE_GETENV)
|
||||
char *
|
||||
SDL_getenv(const char *name)
|
||||
{
|
||||
/* Input validation */
|
||||
if (!name || SDL_strlen(name)==0) {
|
||||
if (!name || !*name) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user