1
0
Fork 0
mirror of https://github.com/opentx/opentx.git synced 2025-07-26 17:55:19 +03:00
This commit is contained in:
bsongis 2014-06-04 12:10:33 +02:00
parent e0295d08da
commit b3d61289e8

View file

@ -911,9 +911,8 @@ QString MainWindow::FindMassstoragePath(QString filename)
DWORD dwMaxFileNameLength=256;
DWORD dwFileSystemFlags=0;
bool ret = GetVolumeInformationW( (WCHAR *) drive.absolutePath().utf16(),szVolumeName,256,&dwSerialNumber,&dwMaxFileNameLength,&dwFileSystemFlags,szFileSystemName,256);
if(ret) {
if (ret) {
QString vName = QString::fromUtf16 ( (const ushort *) szVolumeName) ;
if (vName.contains("TARANIS")) {
temppath = drive.absolutePath();
eepromfile = temppath;
eepromfile.append("/" + filename);
@ -922,7 +921,6 @@ QString MainWindow::FindMassstoragePath(QString filename)
}
}
}
}
#else
struct mount_entry *entry;
entry = read_file_system_list(true);
@ -1054,6 +1052,10 @@ bool MainWindow::readEepromFromRadio(const QString filename, const QString messa
if (IS_ARM(GetCurrentFirmware()->getBoard())) {
QString path = FindMassstoragePath("EEPROM.BIN");
if (path.isEmpty()) {
// Mike's bootloader calls the EEPROM file "ERSKY9X.BIN" :(
path = FindMassstoragePath("ERSKY9X.BIN");
}
if (path.isEmpty()) {
taranisNotFoundDialog *tnfd = new taranisNotFoundDialog(this);
tnfd->exec();