Implement external patches.txt path for UEFIPatch

This commit is contained in:
vit9696 2018-05-07 22:01:17 +03:00
parent f383646033
commit 66c9d4a2cf
3 changed files with 14 additions and 9 deletions

View file

@ -25,15 +25,15 @@ UEFIPatch::~UEFIPatch()
delete ffsEngine;
}
UINT8 UEFIPatch::patchFromFile(QString path)
UINT8 UEFIPatch::patchFromFile(QString path, QString patches)
{
QFileInfo patchInfo = QFileInfo("patches.txt");
QFileInfo patchInfo = QFileInfo(patches);
if (!patchInfo.exists())
return ERR_INVALID_FILE;
QFile file;
file.setFileName("patches.txt");
file.setFileName(patches);
if (!file.open(QFile::ReadOnly | QFile::Text))
return ERR_INVALID_FILE;