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.
This commit is contained in:
parent
cd07a43724
commit
24d51e1c92
3 changed files with 27 additions and 10 deletions
|
|
@ -6,6 +6,7 @@
|
|||
|
||||
#include <filesystem>
|
||||
#include <memory>
|
||||
#include <optional>
|
||||
#include <string>
|
||||
|
||||
#include "common/settings.h"
|
||||
|
|
@ -13,14 +14,14 @@
|
|||
class INIReader;
|
||||
|
||||
class Config {
|
||||
std::unique_ptr<INIReader> sdl2_config;
|
||||
std::filesystem::path sdl2_config_loc;
|
||||
std::unique_ptr<INIReader> sdl2_config;
|
||||
|
||||
bool LoadINI(const std::string& default_contents = "", bool retry = true);
|
||||
void ReadValues();
|
||||
|
||||
public:
|
||||
Config();
|
||||
explicit Config(std::optional<std::filesystem::path> config_path);
|
||||
~Config();
|
||||
|
||||
void Reload();
|
||||
|
|
|
|||
Reference in a new issue