From 5cc718ec7728acb3093f91992023935ba4c73594 Mon Sep 17 00:00:00 2001 From: Hexadec <164735227+Hex4dec@users.noreply.github.com> Date: Mon, 30 Sep 2024 01:06:49 +0300 Subject: [PATCH] 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> --- src/gameconfigfile.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/gameconfigfile.cpp b/src/gameconfigfile.cpp index 82179217c..b61279ebc 100644 --- a/src/gameconfigfile.cpp +++ b/src/gameconfigfile.cpp @@ -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 }