Skip to content

Commit

Permalink
xrGame: textures_descr path now uses current UI style path
Browse files Browse the repository at this point in the history
  • Loading branch information
Xottab-DUTY committed Jul 14, 2018
1 parent 99c3826 commit d1ff686
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
10 changes: 4 additions & 6 deletions src/xrGame/MainMenu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -149,15 +149,13 @@ CMainMenu::~CMainMenu()

void CMainMenu::ReadTextureInfo()
{
string_path buf;
FS_FileSet fset;
FS.file_list(fset, "$game_config$", FS_ListFiles, "ui\\textures_descr\\*.xml");
auto fit = fset.begin();
auto fit_e = fset.end();

for (; fit != fit_e; ++fit)
FS.file_list(fset, "$game_config$", FS_ListFiles, strconcat(sizeof(buf), buf, UI_PATH, "\\", "textures_descr\\*.xml"));
for (const auto& file : fset)
{
string_path fn1, fn2, fn3;
_splitpath((*fit).name.c_str(), fn1, fn2, fn3, 0);
_splitpath(file.name.c_str(), fn1, fn2, fn3, 0);
xr_strcat(fn3, ".xml");

CUITextureMaster::ParseShTexInfo(fn3);
Expand Down
5 changes: 4 additions & 1 deletion src/xrGame/ui/UITextureMaster.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,10 @@ void CUITextureMaster::FreeCachedShaders() { m_shaders.clear(); }
void CUITextureMaster::ParseShTexInfo(LPCSTR xml_file)
{
CUIXml xml;
xml.Load(CONFIG_PATH, "ui\\textures_descr", xml_file);
{
string_path buf;
xml.Load(CONFIG_PATH, strconcat(sizeof(buf), buf, UI_PATH, "\\", "textures_descr"), xml_file);
}

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

Expand Down

0 comments on commit d1ff686

Please sign in to comment.