summaryrefslogtreecommitdiff
path: root/src/yuzu/configuration/input_profiles.cpp
diff options
context:
space:
mode:
authorMorph <39850852+Morph1984@users.noreply.github.com>2021-10-14 14:12:22 -0400
committerGitHub <noreply@github.com>2021-10-14 14:12:22 -0400
commitb02d662980a401057d2ff7c1522d47f9f6538d81 (patch)
tree2717ff56b111eb1adfcb712e14ad69f25ab76b68 /src/yuzu/configuration/input_profiles.cpp
parent894b483a0d619c3ceaa79fa0ff4cef6d37301f9c (diff)
parentb6894bfc5b86c2fae0b401f2cfc294a08994781d (diff)
Merge pull request #6774 from lat9nq/remove-global-yuzu
yuzu qt: Remove global system instances
Diffstat (limited to 'src/yuzu/configuration/input_profiles.cpp')
-rw-r--r--src/yuzu/configuration/input_profiles.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/yuzu/configuration/input_profiles.cpp b/src/yuzu/configuration/input_profiles.cpp
index 333eeb84e..38ea6c772 100644
--- a/src/yuzu/configuration/input_profiles.cpp
+++ b/src/yuzu/configuration/input_profiles.cpp
@@ -28,7 +28,7 @@ std::filesystem::path GetNameWithoutExtension(std::filesystem::path filename) {
} // namespace
-InputProfiles::InputProfiles() {
+InputProfiles::InputProfiles(Core::System& system_) : system{system_} {
const auto input_profile_loc = FS::GetYuzuPath(FS::YuzuPath::ConfigDir) / "input";
if (!FS::IsDir(input_profile_loc)) {
@@ -44,8 +44,8 @@ InputProfiles::InputProfiles() {
if (IsINI(filename) && IsProfileNameValid(name_without_ext)) {
map_profiles.insert_or_assign(
- name_without_ext,
- std::make_unique<Config>(name_without_ext, Config::ConfigType::InputProfile));
+ name_without_ext, std::make_unique<Config>(system, name_without_ext,
+ Config::ConfigType::InputProfile));
}
return true;
@@ -81,7 +81,8 @@ bool InputProfiles::CreateProfile(const std::string& profile_name, std::size_t p
}
map_profiles.insert_or_assign(
- profile_name, std::make_unique<Config>(profile_name, Config::ConfigType::InputProfile));
+ profile_name,
+ std::make_unique<Config>(system, profile_name, Config::ConfigType::InputProfile));
return SaveProfile(profile_name, player_index);
}