MCPcopy Create free account
hub / github.com/RetroAchievements/RALibretro / initializeControllerVariable

Method initializeControllerVariable

src/components/Config.cpp:548–561  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

546}
547
548void 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
563std::string Config::serializeEmulatorSettings() const
564{

Callers

nothing calls this directly

Calls 1

sizeMethod · 0.80

Tested by

no test coverage detected