Input: fix currentText of device combobox

This commit is contained in:
Unknown 2017-11-28 10:57:50 +01:00 committed by Ani
parent 4f5e93bd09
commit 782156b26f
1 changed files with 4 additions and 3 deletions

View File

@ -223,13 +223,14 @@ std::shared_ptr<PadHandlerBase> gamepads_settings_dialog::GetHandler(pad_handler
void gamepads_settings_dialog::ChangeInputType(int player)
{
std::string device = sstr(co_inputtype[player]->currentText());
std::string handler = sstr(co_inputtype[player]->currentText());
std::string device = input_cfg.player_device[player]->to_string();
// Change this player's current handler
if (!input_cfg.player_input[player].from_string(device))
if (!input_cfg.player_input[player].from_string(handler))
{
//Something went wrong
LOG_ERROR(GENERAL, "Failed to convert input string:%s", device);
LOG_ERROR(GENERAL, "Failed to convert input string:%s", handler);
return;
}