Search more paths in SHARE_DIR (#2610)

* Search more paths in SHARE_DIR

Makes it more compatible with more exotic systems such as Guix or NixOS. (one day we'll have a gzdoom without patches)

* Make more places search in SHARE_DIR.

---------

Co-authored-by: Rachael Alexanderson <18584402+madame-rachelle@users.noreply.github.com>
This commit is contained in:
Hexadec 2024-09-30 01:06:49 +03:00 committed by GitHub
parent a4c98d8dd9
commit 5cc718ec77
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -125,6 +125,9 @@ FGameConfigFile::FGameConfigFile ()
SetValueForKey ("Path", "/usr/local/share/games/doom", true);
SetValueForKey ("Path", "/usr/share/doom", true);
SetValueForKey ("Path", "/usr/share/games/doom", true);
SetValueForKey ("Path", SHARE_DIR "/doom", true);
SetValueForKey ("Path", SHARE_DIR "/games/doom", true);
#endif
}
@ -143,6 +146,8 @@ FGameConfigFile::FGameConfigFile ()
SetValueForKey ("Path", "$HOME/" GAME_DIR, true);
SetValueForKey ("Path", "$HOME/.local/share/games/doom", true);
SetValueForKey ("Path", SHARE_DIR, true);
SetValueForKey ("Path", SHARE_DIR "/doom", true);
SetValueForKey ("Path", SHARE_DIR "/games/doom", true);
SetValueForKey ("Path", "/usr/local/share/doom", true);
SetValueForKey ("Path", "/usr/local/share/games/doom", true);
SetValueForKey ("Path", "/usr/share/doom", true);
@ -180,6 +185,10 @@ FGameConfigFile::FGameConfigFile ()
SetValueForKey("Path", "/usr/share/doom/fm_banks", true);
SetValueForKey("Path", "/usr/share/games/doom/soundfonts", true);
SetValueForKey("Path", "/usr/share/games/doom/fm_banks", true);
SetValueForKey("Path", SHARE_DIR "/doom/soundfonts", true);
SetValueForKey("Path", SHARE_DIR "/doom/fm_banks", true);
SetValueForKey("Path", SHARE_DIR "/games/doom/soundfonts", true);
SetValueForKey("Path", SHARE_DIR "/games/doom/fm_banks", true);
SetValueForKey("Path", "/usr/share/soundfonts", true);
#endif
}