fix GetChars in linux/macOS

This commit is contained in:
Ricardo Luís Vaz Silva 2023-10-07 19:34:06 -03:00 committed by Christoph Oelckers
commit c69941e49d
6 changed files with 27 additions and 27 deletions

View file

@ -108,10 +108,10 @@ FGameConfigFile::FGameConfigFile ()
SetValueForKey ("Path", ".", true);
SetValueForKey ("Path", "$DOOMWADDIR", true);
#ifdef __APPLE__
SetValueForKey ("Path", user_docs, true);
SetValueForKey ("Path", user_app_support, true);
SetValueForKey ("Path", user_docs.GetChars(), true);
SetValueForKey ("Path", user_app_support.GetChars(), true);
SetValueForKey ("Path", "$PROGDIR", true);
SetValueForKey ("Path", local_app_support, true);
SetValueForKey ("Path", local_app_support.GetChars(), true);
#elif !defined(__unix__)
SetValueForKey ("Path", "$HOME", true);
SetValueForKey ("Path", "$PROGDIR", true);
@ -133,10 +133,10 @@ FGameConfigFile::FGameConfigFile ()
{
SetSection ("FileSearch.Directories", true);
#ifdef __APPLE__
SetValueForKey ("Path", user_docs, true);
SetValueForKey ("Path", user_app_support, true);
SetValueForKey ("Path", user_docs.GetChars(), true);
SetValueForKey ("Path", user_app_support.GetChars(), true);
SetValueForKey ("Path", "$PROGDIR", true);
SetValueForKey ("Path", local_app_support, true);
SetValueForKey ("Path", local_app_support.GetChars(), true);
#elif !defined(__unix__)
SetValueForKey ("Path", "$PROGDIR", true);
#else
@ -156,14 +156,14 @@ FGameConfigFile::FGameConfigFile ()
{
SetSection("SoundfontSearch.Directories", true);
#ifdef __APPLE__
SetValueForKey("Path", user_docs + "/soundfonts", true);
SetValueForKey("Path", user_docs + "/fm_banks", true);
SetValueForKey("Path", user_app_support + "/soundfonts", true);
SetValueForKey("Path", user_app_support + "/fm_banks", true);
SetValueForKey("Path", (user_docs + "/soundfonts").GetChars(), true);
SetValueForKey("Path", (user_docs + "/fm_banks").GetChars(), true);
SetValueForKey("Path", (user_app_support + "/soundfonts").GetChars(), true);
SetValueForKey("Path", (user_app_support + "/fm_banks").GetChars(), true);
SetValueForKey("Path", "$PROGDIR/soundfonts", true);
SetValueForKey("Path", "$PROGDIR/fm_banks", true);
SetValueForKey("Path", local_app_support + "/soundfonts", true);
SetValueForKey("Path", local_app_support + "/fm_banks", true);
SetValueForKey("Path", (local_app_support + "/soundfonts").GetChars(), true);
SetValueForKey("Path", (local_app_support + "/fm_banks").GetChars(), true);
#elif !defined(__unix__)
SetValueForKey("Path", "$PROGDIR/soundfonts", true);
SetValueForKey("Path", "$PROGDIR/fm_banks", true);