mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-08-02 22:29:21 +00:00
SettingsHandler: Migrate to new filesystem interface
Change SettingsHandler to take a buffer instead of assuming that the setting file to read is always on the host filesystem for more flexibility and make it possible to use the new filesystem interface.
This commit is contained in:
parent
6e9d0ff6de
commit
09d2afa91f
4 changed files with 52 additions and 46 deletions
|
@ -21,14 +21,14 @@ public:
|
|||
INITIAL_SEED = 0x73B5DBFA
|
||||
};
|
||||
|
||||
using Buffer = std::array<u8, SETTINGS_SIZE>;
|
||||
SettingsHandler();
|
||||
|
||||
bool Open(const std::string& settings_file_path);
|
||||
bool Save(const std::string& destination_file_path) const;
|
||||
explicit SettingsHandler(Buffer&& buffer);
|
||||
|
||||
void AddSetting(const std::string& key, const std::string& value);
|
||||
|
||||
const u8* GetData() const;
|
||||
const Buffer& GetBytes() const;
|
||||
void SetBytes(Buffer&& buffer);
|
||||
const std::string GetValue(const std::string& key);
|
||||
|
||||
void Decrypt();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue