summaryrefslogtreecommitdiff
path: root/platform/windows/os_windows.h
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2023-01-16 14:26:14 +0100
committerRémi Verschelde <rverschelde@gmail.com>2023-01-16 16:39:44 +0100
commit818a9e99a4bdbc6e3b12636ceff36759a778e848 (patch)
treedae35a70787bd6795f9738d54b8fe5008ff2ecac /platform/windows/os_windows.h
parent04a39ecd846f40ac1049b699291f28b2f08e2185 (diff)
OS: Add `unset_environment`, better validate input
Instead of returning an undocumented boolean error code, we do the validation checks that should ensure a successful result. Based on: - https://linux.die.net/man/3/setenv - https://learn.microsoft.com/en-us/windows/win32/api/winbase/nf-winbase-setenvironmentvariable
Diffstat (limited to 'platform/windows/os_windows.h')
-rw-r--r--platform/windows/os_windows.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/platform/windows/os_windows.h b/platform/windows/os_windows.h
index c33e0f6740..05110c2614 100644
--- a/platform/windows/os_windows.h
+++ b/platform/windows/os_windows.h
@@ -186,7 +186,8 @@ public:
virtual bool has_environment(const String &p_var) const override;
virtual String get_environment(const String &p_var) const override;
- virtual bool set_environment(const String &p_var, const String &p_value) const override;
+ virtual void set_environment(const String &p_var, const String &p_value) const override;
+ virtual void unset_environment(const String &p_var) const override;
virtual Vector<String> get_system_fonts() const override;
virtual String get_system_font_path(const String &p_font_name, int p_weight = 400, int p_stretch = 100, bool p_italic = false) const override;