mirror of
https://github.com/ciphervance/supercell-wx.git
synced 2025-10-30 20:40:04 +00:00
Fix for local placefiles on linux
This commit is contained in:
parent
b1807489bb
commit
9c41ce7841
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);
|
QUrl url = QUrl::fromUserInput(qImagePath);
|
||||||
|
|
||||||
|
|
||||||
if (url.isLocalFile())
|
if (url.isLocalFile())
|
||||||
{
|
{
|
||||||
QString suffix = QFileInfo(qImagePath).suffix().toLower();
|
QString suffix = QFileInfo(qImagePath).suffix().toLower();
|
||||||
|
QString qLocalImagePath = url.toLocalFile();
|
||||||
|
|
||||||
if (suffix == "svg")
|
if (suffix == "svg")
|
||||||
{
|
{
|
||||||
image = ReadSvgFile(qImagePath);
|
image = ReadSvgFile(qLocalImagePath);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
image = ReadPngFile(qImagePath);
|
image = ReadPngFile(qLocalImagePath);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue