mirror of
https://github.com/ciphervance/supercell-wx.git
synced 2025-10-30 19:00:04 +00:00
Merge pull request #239 from AdenKoperczak/fix_local_images_on_linux
Fix local images on Linux
This commit is contained in:
commit
60aed45450
1 changed files with 4 additions and 2 deletions
|
|
@ -390,17 +390,19 @@ TextureAtlas::Impl::LoadImage(const std::string& imagePath)
|
|||
|
||||
QUrl url = QUrl::fromUserInput(qImagePath);
|
||||
|
||||
|
||||
if (url.isLocalFile())
|
||||
{
|
||||
QString suffix = QFileInfo(qImagePath).suffix().toLower();
|
||||
QString qLocalImagePath = url.toString(QUrl::PreferLocalFile);
|
||||
|
||||
if (suffix == "svg")
|
||||
{
|
||||
image = ReadSvgFile(qImagePath);
|
||||
image = ReadSvgFile(qLocalImagePath);
|
||||
}
|
||||
else
|
||||
{
|
||||
image = ReadPngFile(qImagePath);
|
||||
image = ReadPngFile(qLocalImagePath);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue