mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2024-11-22 06:05:38 +00:00
Fixed an issue that could hang the application when generating miximages.
This commit is contained in:
parent
19a2a9d964
commit
c9cd282b7f
|
@ -811,21 +811,20 @@ void MiximageGenerator::convertFromCImgFormat(CImg<unsigned char> image,
|
||||||
|
|
||||||
std::string MiximageGenerator::getSavePath()
|
std::string MiximageGenerator::getSavePath()
|
||||||
{
|
{
|
||||||
const std::string systemsubdirectory = mGame->getSystem()->getName();
|
|
||||||
const std::string name = Utils::FileSystem::getStem(mGame->getPath());
|
const std::string name = Utils::FileSystem::getStem(mGame->getPath());
|
||||||
std::string subFolders;
|
std::string subFolders;
|
||||||
|
|
||||||
// Extract possible subfolders from the path.
|
// Extract possible subfolders from the path.
|
||||||
if (mGame->getSystemEnvData()->mStartPath != "")
|
if (mGame->getSystemEnvData()->mStartPath != "")
|
||||||
subFolders = Utils::String::replace(Utils::FileSystem::getParent(mGame->getPath()),
|
subFolders = Utils::String::replace(Utils::FileSystem::getParent(mGame->getPath()),
|
||||||
mGame->getSystem()->getSystemEnvData()->mStartPath, "");
|
mGame->getSystemEnvData()->mStartPath, "");
|
||||||
|
|
||||||
std::string path = FileData::getMediaDirectory();
|
std::string path = FileData::getMediaDirectory();
|
||||||
|
|
||||||
if (!Utils::FileSystem::exists(path))
|
if (!Utils::FileSystem::exists(path))
|
||||||
Utils::FileSystem::createDirectory(path);
|
Utils::FileSystem::createDirectory(path);
|
||||||
|
|
||||||
path += systemsubdirectory + "/miximages" + subFolders + "/";
|
path += mGame->getSystemName() + "/miximages" + subFolders + "/";
|
||||||
|
|
||||||
if (!Utils::FileSystem::exists(path))
|
if (!Utils::FileSystem::exists(path))
|
||||||
Utils::FileSystem::createDirectory(path);
|
Utils::FileSystem::createDirectory(path);
|
||||||
|
|
Loading…
Reference in a new issue