From c9cd282b7f66d1008385f40c58e699f20785d51d Mon Sep 17 00:00:00 2001 From: Leon Styhre Date: Wed, 9 Jun 2021 20:38:34 +0200 Subject: [PATCH] Fixed an issue that could hang the application when generating miximages. --- es-app/src/MiximageGenerator.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/es-app/src/MiximageGenerator.cpp b/es-app/src/MiximageGenerator.cpp index 648e2d9e3..6e361797c 100644 --- a/es-app/src/MiximageGenerator.cpp +++ b/es-app/src/MiximageGenerator.cpp @@ -811,21 +811,20 @@ void MiximageGenerator::convertFromCImgFormat(CImg image, std::string MiximageGenerator::getSavePath() { - const std::string systemsubdirectory = mGame->getSystem()->getName(); const std::string name = Utils::FileSystem::getStem(mGame->getPath()); std::string subFolders; // Extract possible subfolders from the path. if (mGame->getSystemEnvData()->mStartPath != "") subFolders = Utils::String::replace(Utils::FileSystem::getParent(mGame->getPath()), - mGame->getSystem()->getSystemEnvData()->mStartPath, ""); + mGame->getSystemEnvData()->mStartPath, ""); std::string path = FileData::getMediaDirectory(); if (!Utils::FileSystem::exists(path)) Utils::FileSystem::createDirectory(path); - path += systemsubdirectory + "/miximages" + subFolders + "/"; + path += mGame->getSystemName() + "/miximages" + subFolders + "/"; if (!Utils::FileSystem::exists(path)) Utils::FileSystem::createDirectory(path);