aboutsummaryrefslogtreecommitdiff
path: root/src/yuzu/configuration/config.cpp
diff options
context:
space:
mode:
authorlat9nq <22451773+lat9nq@users.noreply.github.com>2021-05-25 20:06:06 -0400
committerlat9nq <22451773+lat9nq@users.noreply.github.com>2021-05-25 20:10:41 -0400
commitcfb9bcbe422e02a5274b5edbefdbfc6c026f185a (patch)
treed16b8f9414ebe503cd757b3fe2f1f37683ca6bab /src/yuzu/configuration/config.cpp
parent065867e2c24e9856c360fc2d6b9a86c92aedc43e (diff)
yuzu qt: Handle per-game configs for title id 0
Currently with programs that have a 0 title id, yuzu loads the custom configuration 0000000000000000.ini for per-game configs. This is not ideal since many homebrews share this id. Instead for these programs, we load a config that is simply the file name and `.ini` appended to it.
Diffstat (limited to 'src/yuzu/configuration/config.cpp')
-rw-r--r--src/yuzu/configuration/config.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/yuzu/configuration/config.cpp b/src/yuzu/configuration/config.cpp
index eb58bfa5b9..552454acf2 100644
--- a/src/yuzu/configuration/config.cpp
+++ b/src/yuzu/configuration/config.cpp
@@ -16,7 +16,7 @@
namespace FS = Common::FS;
-Config::Config(const std::string& config_name, ConfigType config_type) : type(config_type) {
+Config::Config(std::string_view config_name, ConfigType config_type) : type(config_type) {
global = config_type == ConfigType::GlobalConfig;
Initialize(config_name);
@@ -242,7 +242,7 @@ const std::array<UISettings::Shortcut, 17> Config::default_hotkeys{{
}};
// clang-format on
-void Config::Initialize(const std::string& config_name) {
+void Config::Initialize(std::string_view config_name) {
const auto fs_config_loc = FS::GetYuzuPath(FS::YuzuPath::ConfigDir);
const auto config_file = fmt::format("{}.ini", config_name);