From f99b5c05bb421910516841e71c4f3d6ca5ef0743 Mon Sep 17 00:00:00 2001 From: MysterD Date: Fri, 14 Apr 2023 11:04:22 -0700 Subject: [PATCH] Fix how languages detect the lang file path --- src/pc/djui/djui_language.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/pc/djui/djui_language.c b/src/pc/djui/djui_language.c index 707457f6..8830944e 100644 --- a/src/pc/djui/djui_language.c +++ b/src/pc/djui/djui_language.c @@ -2,6 +2,8 @@ #include "djui_unicode.h" #include "pc/ini.h" #include "pc/platform.h" +#include "pc/mods/mods.h" +#include "pc/mods/mods_utils.h" ini_t* sLang = NULL; @@ -13,9 +15,12 @@ bool djui_language_init(char* lang) { } // construct path + char exePath[SYS_MAX_PATH] = ""; + path_get_folder((char*)path_to_executable(), exePath); + char path[SYS_MAX_PATH] = ""; if (!lang || lang[0] == '\0') { lang = "English"; } - snprintf(path, SYS_MAX_PATH, "%s/lang/%s.ini", sys_exe_path(), lang); + snprintf(path, SYS_MAX_PATH, "%s/lang/%s.ini", exePath, lang); // load sLang = ini_load(path);