From 24d51e1c925896e18e4536916b8c80f0b41e54fb Mon Sep 17 00:00:00 2001 From: lat9nq Date: Tue, 15 Mar 2022 01:05:55 -0400 Subject: yuzu_cmd: Allow user to specify config file location Adds an option `-c` or `--config` with one required argument that allows the user to specify to where the config file is located. Useful for scripts that run specific games with different preferences for settings. --- src/yuzu_cmd/config.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/yuzu_cmd/config.h') diff --git a/src/yuzu_cmd/config.h b/src/yuzu_cmd/config.h index 1ee932be2..f61ba23ec 100644 --- a/src/yuzu_cmd/config.h +++ b/src/yuzu_cmd/config.h @@ -6,6 +6,7 @@ #include #include +#include #include #include "common/settings.h" @@ -13,14 +14,14 @@ class INIReader; class Config { - std::unique_ptr sdl2_config; std::filesystem::path sdl2_config_loc; + std::unique_ptr sdl2_config; bool LoadINI(const std::string& default_contents = "", bool retry = true); void ReadValues(); public: - Config(); + explicit Config(std::optional config_path); ~Config(); void Reload(); -- cgit v1.2.3