Try to correct string encoding issue in scripting. Fixes #2278

This commit is contained in:
Marianne Gagnon 2015-08-11 19:30:20 -04:00
parent 70799539a6
commit ea9520863d

View File

@ -53,10 +53,9 @@ namespace Scripting
{
InputDevice* device = input_manager->getDeviceManager()->getLatestUsedDevice();
DeviceConfig* config = device->getConfiguration();
irr::core::stringw control;
PlayerAction ScriptAction = (PlayerAction)Enum_value;
control = config->getBindingAsString(ScriptAction);
std::string key = std::string(irr::core::stringc(control).c_str());
irr::core::stringw control = config->getBindingAsString(ScriptAction);
std::string key = StringUtils::wide_to_utf8(control.c_str());
return key;
}