mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-03 21:41:26 +12:00
Input: Fix "," key in keyboard pad handler
This commit is contained in:
parent
830b1a8a8d
commit
9fce70809e
2 changed files with 9 additions and 3 deletions
|
@ -8,7 +8,13 @@ extern std::string g_input_config_override;
|
||||||
|
|
||||||
std::vector<std::string> cfg_pad::get_buttons(const std::string& str)
|
std::vector<std::string> cfg_pad::get_buttons(const std::string& str)
|
||||||
{
|
{
|
||||||
std::vector<std::string> vec = fmt::split(str, {","});;
|
std::vector<std::string> vec = fmt::split(str, {","});
|
||||||
|
|
||||||
|
// Handle special case: string contains separator itself as configured value
|
||||||
|
if (str == "," || str.find(",,") != umax)
|
||||||
|
{
|
||||||
|
vec.push_back(",");
|
||||||
|
}
|
||||||
|
|
||||||
// Remove duplicates
|
// Remove duplicates
|
||||||
std::sort(vec.begin(), vec.end());
|
std::sort(vec.begin(), vec.end());
|
||||||
|
|
|
@ -213,13 +213,13 @@ bool emu_settings::ValidateSettings(bool cleanup)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
const auto get_full_key = [&keys](const std::string& seperator) -> std::string
|
const auto get_full_key = [&keys](const std::string& separator) -> std::string
|
||||||
{
|
{
|
||||||
std::string full_key;
|
std::string full_key;
|
||||||
for (usz i = 0; i < keys.size(); i++)
|
for (usz i = 0; i < keys.size(); i++)
|
||||||
{
|
{
|
||||||
full_key += keys[i];
|
full_key += keys[i];
|
||||||
if (i < keys.size() - 1) full_key += seperator;
|
if (i < keys.size() - 1) full_key += separator;
|
||||||
}
|
}
|
||||||
return full_key;
|
return full_key;
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue