Skip to content

Commit d1ff686

Browse files
committed
xrGame: textures_descr path now uses current UI style path
1 parent 99c3826 commit d1ff686

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

src/xrGame/MainMenu.cpp

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -149,15 +149,13 @@ CMainMenu::~CMainMenu()
149149

150150
void CMainMenu::ReadTextureInfo()
151151
{
152+
string_path buf;
152153
FS_FileSet fset;
153-
FS.file_list(fset, "$game_config$", FS_ListFiles, "ui\\textures_descr\\*.xml");
154-
auto fit = fset.begin();
155-
auto fit_e = fset.end();
156-
157-
for (; fit != fit_e; ++fit)
154+
FS.file_list(fset, "$game_config$", FS_ListFiles, strconcat(sizeof(buf), buf, UI_PATH, "\\", "textures_descr\\*.xml"));
155+
for (const auto& file : fset)
158156
{
159157
string_path fn1, fn2, fn3;
160-
_splitpath((*fit).name.c_str(), fn1, fn2, fn3, 0);
158+
_splitpath(file.name.c_str(), fn1, fn2, fn3, 0);
161159
xr_strcat(fn3, ".xml");
162160

163161
CUITextureMaster::ParseShTexInfo(fn3);

src/xrGame/ui/UITextureMaster.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,10 @@ void CUITextureMaster::FreeCachedShaders() { m_shaders.clear(); }
2828
void CUITextureMaster::ParseShTexInfo(LPCSTR xml_file)
2929
{
3030
CUIXml xml;
31-
xml.Load(CONFIG_PATH, "ui\\textures_descr", xml_file);
31+
{
32+
string_path buf;
33+
xml.Load(CONFIG_PATH, strconcat(sizeof(buf), buf, UI_PATH, "\\", "textures_descr"), xml_file);
34+
}
3235

3336
int files_num = xml.GetNodesNum("", 0, "file");
3437

0 commit comments

Comments
 (0)