diff options
author | Morph <39850852+Morph1984@users.noreply.github.com> | 2020-09-23 09:52:25 -0400 |
---|---|---|
committer | Morph <39850852+Morph1984@users.noreply.github.com> | 2020-11-15 23:33:19 -0500 |
commit | 57d89e291de0eacfd368784309a0cbf89d38dcc8 (patch) | |
tree | eedaf34c8fda2dc47c07cf5e2fe528d78aa9adc0 /src/yuzu/configuration/input_profiles.h | |
parent | 75eaab2e0f48eb588c1bfb85f96630e199fbc1da (diff) |
input_profiles: Implement input profiles
Diffstat (limited to 'src/yuzu/configuration/input_profiles.h')
-rw-r--r-- | src/yuzu/configuration/input_profiles.h | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/src/yuzu/configuration/input_profiles.h b/src/yuzu/configuration/input_profiles.h new file mode 100644 index 000000000..cb41fd9be --- /dev/null +++ b/src/yuzu/configuration/input_profiles.h @@ -0,0 +1,32 @@ +// Copyright 2020 yuzu Emulator Project +// Licensed under GPLv2 or any later version +// Refer to the license.txt file included. + +#pragma once + +#include <string> +#include <string_view> +#include <unordered_map> + +class Config; + +class InputProfiles { + +public: + explicit InputProfiles(); + virtual ~InputProfiles(); + + std::vector<std::string> GetInputProfileNames(); + + static bool IsProfileNameValid(std::string_view profile_name); + + bool CreateProfile(const std::string& profile_name, std::size_t player_index); + bool DeleteProfile(const std::string& profile_name); + bool LoadProfile(const std::string& profile_name, std::size_t player_index); + bool SaveProfile(const std::string& profile_name, std::size_t player_index); + +private: + bool ProfileExistsInMap(const std::string& profile_name) const; + + std::unordered_map<std::string, std::unique_ptr<Config>> map_profiles; +}; |