mirror of
https://gitlab.com/Mr_Goldberg/goldberg_emulator
synced 2025-07-07 06:52:15 +08:00
Set the appid env variables.
This commit is contained in:
10
dll/base.cpp
10
dll/base.cpp
@ -41,6 +41,11 @@ std::string get_env_variable(std::string name)
|
||||
return utf8_encode(env_variable);
|
||||
}
|
||||
|
||||
bool set_env_variable(std::string name, std::string value)
|
||||
{
|
||||
return SetEnvironmentVariableW(utf8_decode(name).c_str(), utf8_decode(value).c_str());
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
static int fd = -1;
|
||||
@ -81,6 +86,11 @@ std::string get_env_variable(std::string name)
|
||||
return std::string(env);
|
||||
}
|
||||
|
||||
bool set_env_variable(std::string name, std::string value)
|
||||
{
|
||||
return setenv(name.c_str(), value.c_str(), 1) == 0;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
std::recursive_mutex global_mutex;
|
||||
|
Reference in New Issue
Block a user