mirror of
https://git.h3cjp.net/H3cJP/citra.git
synced 2024-11-24 08:02:46 +00:00
b91b76df4f
Creates a new BasicSettings class in common/settings, and forces setting a default and label for each setting that uses it in common/settings. Moves defaults and labels from both frontends into common settings. Creates a helper function in each frontend to facillitate reading the settings now with the new default and label properties. Settings::Setting is also now a subclass of Settings::BasicSetting. Also adds documentation for both Setting and BasicSetting.
32 lines
642 B
C++
32 lines
642 B
C++
// Copyright 2014 Citra Emulator Project
|
|
// Licensed under GPLv2 or any later version
|
|
// Refer to the license.txt file included.
|
|
|
|
#pragma once
|
|
|
|
#include <filesystem>
|
|
#include <memory>
|
|
#include <string>
|
|
|
|
#include "common/settings.h"
|
|
|
|
class INIReader;
|
|
|
|
class Config {
|
|
std::unique_ptr<INIReader> sdl2_config;
|
|
std::filesystem::path sdl2_config_loc;
|
|
|
|
bool LoadINI(const std::string& default_contents = "", bool retry = true);
|
|
void ReadValues();
|
|
|
|
public:
|
|
Config();
|
|
~Config();
|
|
|
|
void Reload();
|
|
|
|
private:
|
|
template <typename Type>
|
|
void ReadSetting(const std::string& group, Settings::BasicSetting<Type> setting);
|
|
};
|