mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-07-22 16:19:19 +02:00
Fix loading mini textures with periods
Some textures, like textures/mini/9-107.13, had incorrectly part of their name removed (truncated to textures/mini/9-107) and thus were failing to load. The workaround was to add an explicit ".bmp" extension for that to be removed instead.
This commit is contained in:
@@ -95,7 +95,7 @@ void ui::vehicles_bank::parse_category_entry(const std::string ¶m)
|
|||||||
std::string mini;
|
std::string mini;
|
||||||
std::getline(stream, mini, ',');
|
std::getline(stream, mini, ',');
|
||||||
|
|
||||||
category_icons.emplace(ctx_type, "textures/mini/" + ToLower(mini));
|
category_icons.emplace(ctx_type, "textures/mini/" + ToLower(mini) + ".bmp");
|
||||||
}
|
}
|
||||||
|
|
||||||
void ui::vehicles_bank::parse_controllable_entry(const std::string &target, const std::string ¶m)
|
void ui::vehicles_bank::parse_controllable_entry(const std::string &target, const std::string ¶m)
|
||||||
@@ -122,12 +122,12 @@ void ui::vehicles_bank::parse_texture_info(const std::string &target, const std:
|
|||||||
set.meta = meta;
|
set.meta = meta;
|
||||||
|
|
||||||
if (!mini.empty())
|
if (!mini.empty())
|
||||||
group_icons.emplace(mini, std::move(deferred_image("textures/mini/" + ToLower(mini))));
|
group_icons.emplace(mini, std::move(deferred_image("textures/mini/" + ToLower(mini) + ".bmp")));
|
||||||
|
|
||||||
if (!miniplus.empty())
|
if (!miniplus.empty())
|
||||||
set.mini = std::move(deferred_image("textures/mini/" + ToLower(miniplus)));
|
set.mini = std::move(deferred_image("textures/mini/" + ToLower(miniplus) + ".bmp"));
|
||||||
else if (!mini.empty())
|
else if (!mini.empty())
|
||||||
set.mini = std::move(deferred_image("textures/mini/" + ToLower(mini)));
|
set.mini = std::move(deferred_image("textures/mini/" + ToLower(mini) + ".bmp"));
|
||||||
|
|
||||||
set.skin = ToLower(target);
|
set.skin = ToLower(target);
|
||||||
erase_extension(set.skin);
|
erase_extension(set.skin);
|
||||||
|
|||||||
Reference in New Issue
Block a user