1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-04 12:00:25 +00:00

Added set_environment to OS class

This commit is contained in:
Ignacio Etcheverry
2019-01-29 22:59:38 +01:00
parent d3c51a5dfb
commit 41873ffa88
7 changed files with 19 additions and 0 deletions

View File

@@ -469,6 +469,11 @@ String OS_Unix::get_environment(const String &p_var) const {
return "";
}
bool OS_Unix::set_environment(const String &p_var, const String &p_value) const {
return setenv(p_var.utf8().get_data(), p_var.utf8().get_data(), /* overwrite: */ true) == 0;
}
int OS_Unix::get_processor_count() const {
return sysconf(_SC_NPROCESSORS_CONF);