KnossosNET / Knossos.NET

Repository for the Knossos.NET launcher, currently in development.
GNU General Public License v3.0
23 stars 10 forks source link

Refresh the ini if preferred path changes #82

Closed JohnAFernandez closed 8 months ago

JohnAFernandez commented 8 months ago

So, this took a little while to figure out. The symptom was that KNet was only respecting my resolution once I had at least opened the settings tab. The settings tab was reloading the ini from an updated preferred path from the FSO executable. KNet was not using this preferred path when it first attempted to load the ini because the load order is ini and default settings first, then executables, then flags. It would get the preferred path in flags.

This PR allows KNet to reload the ini if the preferred path changes. Now, I believe this should allow KNet to load the correct ini whenever the preferred path from the executable changes, although I believe this would only be true if the user switches to portable mode.

Fixes #80

In draft, until I have confirmation that this does not break anything.

JohnAFernandez commented 8 months ago

This now loads from the correct folder on Mac on startup. Still keeping the change of loading the new ini from the new perferred folder whenever it changes, to make sure we match the ini that FSO loads.