| 546 | } |
| 547 | |
| 548 | void Config::initializeControllerVariable(Variable& variable, const char* name, const char* key, const std::map<std::string, unsigned>& names, unsigned selectedDevice) |
| 549 | { |
| 550 | variable._name = name; |
| 551 | variable._key = key; |
| 552 | variable._selected = 0; |
| 553 | |
| 554 | for (const auto& pair : names) |
| 555 | { |
| 556 | if (pair.second == selectedDevice) |
| 557 | variable._selected = variable._options.size(); |
| 558 | |
| 559 | variable._options.push_back(pair.first); |
| 560 | } |
| 561 | } |
| 562 | |
| 563 | std::string Config::serializeEmulatorSettings() const |
| 564 | { |