mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-03-22 15:05:03 +01:00
build 191212. gamepad input configuration support, minor bug fixes
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user