mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2024-11-22 22:25:38 +00:00
The emulator name is now displayed if it's not found during game launch.
This commit is contained in:
parent
3ce62550c8
commit
d0b773a8ce
|
@ -945,8 +945,8 @@ void FileData::launchGame()
|
||||||
LOG(LogError) << "Raw emulator launch command:";
|
LOG(LogError) << "Raw emulator launch command:";
|
||||||
LOG(LogError) << commandRaw;
|
LOG(LogError) << commandRaw;
|
||||||
|
|
||||||
window->queueInfoPopup("ERROR: MISSING EMULATOR CONFIGURATION FOR '" + emulatorEntry + "'",
|
window->queueInfoPopup(
|
||||||
6000);
|
"ERROR: MISSING EMULATOR FIND RULES CONFIGURATION FOR '" + emulatorEntry + "'", 6000);
|
||||||
window->setAllowTextScrolling(true);
|
window->setAllowTextScrolling(true);
|
||||||
window->setAllowFileAnimation(true);
|
window->setAllowFileAnimation(true);
|
||||||
return;
|
return;
|
||||||
|
@ -956,8 +956,24 @@ void FileData::launchGame()
|
||||||
LOG(LogError) << "Raw emulator launch command:";
|
LOG(LogError) << "Raw emulator launch command:";
|
||||||
LOG(LogError) << commandRaw;
|
LOG(LogError) << commandRaw;
|
||||||
|
|
||||||
|
std::string emulatorName;
|
||||||
|
size_t startPos {0};
|
||||||
|
size_t endPos {0};
|
||||||
|
|
||||||
|
if ((startPos = command.find("%EMULATOR_")) != std::string::npos) {
|
||||||
|
endPos = command.find("%", startPos + 1);
|
||||||
|
if (endPos != std::string::npos)
|
||||||
|
emulatorName = command.substr(startPos + 10, endPos - startPos - 10);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (emulatorName == "")
|
||||||
window->queueInfoPopup("ERROR: COULDN'T FIND EMULATOR, HAS IT BEEN PROPERLY INSTALLED?",
|
window->queueInfoPopup("ERROR: COULDN'T FIND EMULATOR, HAS IT BEEN PROPERLY INSTALLED?",
|
||||||
6000);
|
6000);
|
||||||
|
else
|
||||||
|
window->queueInfoPopup("ERROR: COULDN'T FIND EMULATOR '" + emulatorName +
|
||||||
|
"', HAS IT BEEN PROPERLY INSTALLED?",
|
||||||
|
6000);
|
||||||
|
|
||||||
window->setAllowTextScrolling(true);
|
window->setAllowTextScrolling(true);
|
||||||
window->setAllowFileAnimation(true);
|
window->setAllowFileAnimation(true);
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Reference in a new issue