mirror of
https://github.com/EdgeTX/edgetx.git
synced 2025-07-24 16:55:15 +03:00
Fix detection of other language simulators
This commit is contained in:
parent
07bbcce093
commit
3edacafcf1
1 changed files with 9 additions and 8 deletions
|
@ -46,15 +46,16 @@ SimulatorFactory *getSimulatorFactory(const QString &name)
|
||||||
QString simuName = name;
|
QString simuName = name;
|
||||||
while(1) {
|
while(1) {
|
||||||
qDebug() << "searching" << simuName << "simulator";
|
qDebug() << "searching" << simuName << "simulator";
|
||||||
if (registered_simulators.contains(simuName)) {
|
foreach (QString name, registered_simulators.keys()) {
|
||||||
return registered_simulators[simuName];
|
if (name.contains(simuName)) {
|
||||||
}
|
simuName = name;
|
||||||
else {
|
return registered_simulators[simuName];
|
||||||
int pos = simuName.lastIndexOf('-');
|
}
|
||||||
if (pos <= 0)
|
|
||||||
break;
|
|
||||||
simuName = simuName.mid(0, pos);
|
|
||||||
}
|
}
|
||||||
|
int pos = simuName.lastIndexOf('-');
|
||||||
|
if (pos <= 0)
|
||||||
|
break;
|
||||||
|
simuName = simuName.mid(0, pos);
|
||||||
}
|
}
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue