diff options
| author | JosJuice <josjuice@gmail.com> | 2024-02-04 17:36:15 +0100 |
|---|---|---|
| committer | JosJuice <josjuice@gmail.com> | 2024-02-04 17:55:08 +0100 |
| commit | 1315b54ffaa2833ddda7e543945c88ed5396efd6 (patch) | |
| tree | d3456e99b1a9f902d4232144c47999b7d185a697 /Source/Core/InputCommon/InputConfig.cpp | |
| parent | 6cf55ab1ee13e62b272642ae4f1fadcc792b5e28 (diff) | |
InputCommon: Use distinct values for profile key
Because the last commit made us use separate folders for GCPad and
GCKey profiles, we should also use separate game INI keys for them.
Otherwise setting e.g. PadProfile1 in a game INI will make both GCPad
and GCKey try to load it, typically with one of them succeeding and the
other one showing a panic alert due to the profile not existing in its
folder.
Better do this breaking change for GCKeys in the same PR as the other
breaking change rather than later.
Diffstat (limited to 'Source/Core/InputCommon/InputConfig.cpp')
| -rw-r--r-- | Source/Core/InputCommon/InputConfig.cpp | 18 |
1 files changed, 2 insertions, 16 deletions
diff --git a/Source/Core/InputCommon/InputConfig.cpp b/Source/Core/InputCommon/InputConfig.cpp index 651e2821c2..ff3f68acd0 100644 --- a/Source/Core/InputCommon/InputConfig.cpp +++ b/Source/Core/InputCommon/InputConfig.cpp @@ -20,9 +20,9 @@ #include "InputCommon/InputProfile.h" InputConfig::InputConfig(const std::string& ini_name, const std::string& gui_name, - const std::string& profile_directory_name, InputClass input_class) + const std::string& profile_directory_name, const std::string& profile_key) : m_ini_name(ini_name), m_gui_name(gui_name), m_profile_directory_name(profile_directory_name), - m_input_class(input_class) + m_profile_key(profile_key) { } @@ -159,20 +159,6 @@ bool InputConfig::ControllersNeedToBeCreated() const return m_controllers.empty(); } -std::string InputConfig::GetProfileKey() const -{ - switch (m_input_class) - { - case InputClass::GBA: - return "GBA"; - case InputClass::Wii: - return "Wiimote"; - case InputClass::GC: - default: - return "Pad"; - } -} - std::string InputConfig::GetUserProfileDirectoryPath() const { return fmt::format("{}Profiles/{}/", File::GetUserPath(D_CONFIG_IDX), GetProfileDirectoryName()); |
