build 191212. gamepad input configuration support, minor bug fixes

This commit is contained in:
tmj-fstate
2019-12-15 16:48:55 +01:00
parent a54924c48d
commit 7c43f80ccf
12 changed files with 427 additions and 240 deletions

View File

@@ -193,6 +193,19 @@ std::vector<std::string> Split(const std::string &s)
return elems;
}
std::pair<std::string, int>
split_index( std::string const &Key ) {
auto const indexstart{ Key.find_first_of( "-1234567890" ) };
auto const indexend{ Key.find_first_not_of( "-1234567890", indexstart ) };
if( indexstart != std::string::npos ) {
return {
Key.substr( 0, indexstart ),
std::stoi( Key.substr( indexstart, indexend - indexstart ) ) };
}
return { Key, 0 };
}
std::string to_string(int Value)
{
std::ostringstream o;