Ignore lines starting with "#" when parsing the mappings string given to love.joystick.loadGamepadMappings.

This commit is contained in:
Alex Szpakowski
2014-11-03 16:34:18 -04:00
parent 0d28135465
commit 195d41d1d9
@@ -489,6 +489,10 @@ void JoystickModule::loadGamepadMappings(const std::string &mappings)
if (mapping.empty())
continue;
// Lines starting with "#" are comments.
if (mapping[0] == '#')
continue;
// Strip out and compare any "platform:XYZ," in the mapping.
size_t pstartpos = mapping.find("platform:");
if (pstartpos != std::string::npos)