Read the default of a CVar

Moderator: GZDoom Developers

User avatar
Marrub
 
 
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

Post by Marrub »

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.
User avatar
Marrub
 
 
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

Post by Marrub »

Opened a PR: #2950
Took maybe 5 minutes to implement? Shoulda just done that first instead of asking.
User avatar
inkoalawetrust
Posts: 86
Joined: Mon Aug 26, 2019 9:18 pm
Graphics Processor: nVidia with Vulkan support

Re: Read the default of a CVar

Post by inkoalawetrust »

Well, it's been merged so a moderator should probably move this to the closed feature suggestions subforum.

Return to “Closed Feature Suggestions [GZDoom]”