Silier Posted November 1, 2022 Share Posted November 1, 2022 (edited) ^ Edited November 1, 2022 by Silier Link to comment Share on other sites More sharing options...
nani Posted November 1, 2022 Share Posted November 1, 2022 https://github.com/nanihadesuka/autociv/search?q=ConfigDB_WriteFile Use case: to save custom user config. Link to comment Share on other sites More sharing options...
Silier Posted November 1, 2022 Author Share Posted November 1, 2022 17 minutes ago, nani said: https://github.com/nanihadesuka/autociv/search?q=ConfigDB_WriteFile Use case: to save custom user config. but you still use config/user.cfg, so it is okay if you would not be able to specify the path to file Link to comment Share on other sites More sharing options...
hyperion Posted November 1, 2022 Share Posted November 1, 2022 Apparently the rational is in http://www.wildfiregames.com/forum/index.php?showtopic=1125 but it's private (gotta love proper documentation). Link to comment Share on other sites More sharing options...
nani Posted November 1, 2022 Share Posted November 1, 2022 I would instead ask why is this being asked? Is it planned to be removed or limited in some way so the code is simplified or more secure? Link to comment Share on other sites More sharing options...
Silier Posted November 1, 2022 Author Share Posted November 1, 2022 there is over 20 places in code telling the configuration file along with the scope "user". the "user" scope is bound by default to "config/user.cfg" unless you would specify new configuration file for the scope, you will not read configuration from other file than default so setting file path in those functions is pointless and you lost access to stored configuration after restart basically this https://code.wildfiregames.com/D4616 Link to comment Share on other sites More sharing options...
nani Posted November 1, 2022 Share Posted November 1, 2022 One could also say this should be just a function defined in javascript `mod/common` that wraps the engine call in an unique function that would be used in other parts of the codebase instead of hardcoding the path in c++ for each namespace. But anyway, from a practical standpoint this also looks fine to me. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now