Read the default of a CVar
Moderator: GZDoom Developers
-
-
- Posts: 1202
- Joined: Tue Feb 26, 2013 2:48 pm
- Preferred Pronouns: No Preference
- Operating System Version (Optional): Arch Linux
- Graphics Processor: ATI/AMD with Vulkan/Metal Support
Read the default of a CVar
I don't think anyone's suggested this before, but could there be functions to get the default value of a CVar? This would be useful for option menus, for instance. Currently you could reset the CVar, get the value, and then set it back to what it was, but that's arduous and may interact weirdly with custom CVar classes.
-
-
- Posts: 1202
- Joined: Tue Feb 26, 2013 2:48 pm
- Preferred Pronouns: No Preference
- Operating System Version (Optional): Arch Linux
- Graphics Processor: ATI/AMD with Vulkan/Metal Support
Re: Read the default of a CVar
Opened a PR: #2950
Took maybe 5 minutes to implement? Shoulda just done that first instead of asking.
Took maybe 5 minutes to implement? Shoulda just done that first instead of asking.
-
- Posts: 86
- Joined: Mon Aug 26, 2019 9:18 pm
- Graphics Processor: nVidia with Vulkan support
Re: Read the default of a CVar
Well, it's been merged so a moderator should probably move this to the closed feature suggestions subforum.