mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-29 20:28:56 +00:00
SettingsHandler: Add Open and Save member functions
This commit is contained in:
parent
f37c5f1f1c
commit
98291cd843
4 changed files with 53 additions and 40 deletions
|
@ -6,6 +6,7 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include <array>
|
||||
#include <string>
|
||||
|
||||
#include "Common/CommonTypes.h"
|
||||
|
@ -13,8 +14,6 @@
|
|||
class SettingsHandler
|
||||
{
|
||||
public:
|
||||
SettingsHandler();
|
||||
|
||||
enum
|
||||
{
|
||||
SETTINGS_SIZE = 0x100,
|
||||
|
@ -22,6 +21,11 @@ public:
|
|||
INITIAL_SEED = 0x73B5DBFA
|
||||
};
|
||||
|
||||
SettingsHandler();
|
||||
|
||||
bool Open(const std::string& settings_file_path);
|
||||
bool Save(const std::string& destination_file_path) const;
|
||||
|
||||
void AddSetting(const std::string& key, const std::string& value);
|
||||
|
||||
const u8* GetData() const;
|
||||
|
@ -34,7 +38,7 @@ public:
|
|||
private:
|
||||
void WriteByte(u8 b);
|
||||
|
||||
u8 m_buffer[SETTINGS_SIZE];
|
||||
std::array<u8, SETTINGS_SIZE> m_buffer;
|
||||
u32 m_position, m_key;
|
||||
std::string decoded;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue