Found a bug, although you've probably already fixed it, but here it is just in case.
In YeloSettings.cpp the LoadSettingsUser function doesn't close the file that it opens, which stops any settings from being saved later on. Also, in some of your components' LoadSettings functions you have "int32 i" being declared inside the if statement that reads from the settings file, which results in the component always loading default settings.
Code:
int32 i = 0;
if (file != NULL && fscanf_s(file, "[FOV]\n") != EOF)
{
int32 i = fscanf_s(file, "vertical radians: %f\n", &_fov_globals.fov.vertical);
fscanf_s(file, "\n");
}
//i will always be zero
if (i < 1)
_fov_globals.InitializeToDefaultSettings();
Also, in Main.cpp the Settings component is initialised and loads all settings first, but should to settings not be loaded last? As currently it loads the settings of other components, which are then initialised afterwards, plausibly reverting any loaded values to defaults.
Bookmarks