Qt: Add "New..." to input profile save button

This will ensure the profile gets saved to the correct location.
This commit is contained in:
Connor McLaughlin
2020-04-27 01:05:01 +10:00
parent a8c43b0c8c
commit 63692a012f
4 changed files with 55 additions and 20 deletions

View File

@ -874,6 +874,11 @@ void CommonHostInterface::RegisterSaveStateHotkeys()
}
}
std::string CommonHostInterface::GetPathForInputProfile(const char* name) const
{
return GetUserDirectoryRelativePath("inputprofiles/%s.ini", name);
}
std::vector<std::pair<std::string, std::string>> CommonHostInterface::GetInputProfileList() const
{
FileSystem::FindResultsArray results;

View File

@ -92,6 +92,9 @@ protected:
/// Reloads the input map from config. Callable from controller interface.
virtual void UpdateInputMap() = 0;
/// Returns a path where an input profile with the specified name would be saved.
std::string GetPathForInputProfile(const char* name) const;
/// Returns a list of all input profiles. first - name, second - path
std::vector<std::pair<std::string, std::string>> GetInputProfileList() const;