1
0
Fork 0
mirror of https://github.com/opentx/opentx.git synced 2025-07-21 23:35:17 +03:00

[Simulator] Fix standalone simulator setting SD card path.

This commit is contained in:
Max Paperno 2017-01-17 04:54:05 -05:00
parent 992c4c4822
commit c67fdcfd6e

View file

@ -382,15 +382,17 @@ int main(int argc, char *argv[])
g.simuLastEepe(simOptions.eepromFileName);
uint32_t flags = SIMULATOR_FLAGS_STANDALONE;
SimulatorInterface * simulator = factory->create();
simulator->setSdPath(g.profile[simOptions.profileId].sdPath(), "");
if (factory->type() == BOARD_HORUS)
dialog = new SimulatorDialogHorus(NULL, factory->create(), flags);
dialog = new SimulatorDialogHorus(NULL, simulator, flags);
else if (factory->type() == BOARD_FLAMENCO)
dialog = new SimulatorDialogFlamenco(NULL, factory->create(), flags);
dialog = new SimulatorDialogFlamenco(NULL, simulator, flags);
else if (factory->type() == BOARD_TARANIS_X9D || factory->type() == BOARD_TARANIS_X9DP || factory->type() == BOARD_TARANIS_X9E)
dialog = new SimulatorDialogTaranis(NULL, factory->create(), flags | SIMULATOR_FLAGS_S1 | SIMULATOR_FLAGS_S2);
dialog = new SimulatorDialogTaranis(NULL, simulator, flags | SIMULATOR_FLAGS_S1 | SIMULATOR_FLAGS_S2);
else
dialog = new SimulatorDialog9X(NULL, factory->create(), flags);
dialog = new SimulatorDialog9X(NULL, simulator, flags);
dialog->setRadioProfileId(simOptions.profileId);
dialog->start(simOptions.eepromFileName.toLatin1().constData());