gonetz / GLideN64

A new generation, open-source graphics plugin for N64 emulators.
Other
754 stars 174 forks source link

GLideNUI: improve settings loading #2756

Closed Rosalie241 closed 1 year ago

Rosalie241 commented 1 year ago

This patch improves the work I did in https://github.com/gonetz/GLideN64/pull/2643 and https://github.com/gonetz/GLideN64/pull/2654.

The problems before this patch are

1) my RMG updater (on windows) would always overwrite GLideN64.custom.ini, overwriting the user's per game settings. 2) GLideN64.custom.ini not being updated for linux system installations due to it copying GLideN64.custom.ini only once.

This patch solves it by reading the GLideN64.custom.ini from the user config directory first, if that doesn't exist or doesn't contain the specified ROM that's being loaded, then it'll fallback to the shared GLideN64.custom.ini file, and GLideNUI will save to the user's config directory for both the GLideN64.ini and GLideN64.custom.ini files, solving both problems and improving upon the previous solution I had.