settings: implement KeyValueStore (#1659)

* settings: implement KeyValueStore and dependencies

* settings: update KeyValueStore for recent refactoring

* settings: address feedback
This commit is contained in:
Adubbz authored and GitHub committed 2021-10-09 09:16:40 -07:00
1 parent 14c8801259
commit 303c6eb5f9
23 files changed
+2767 -81

No files matched your search

@@ -20,19 +20,4 @@
namespace ams::settings::fwdbg {
constexpr size_t SettingsNameLengthMax = 0x40;
constexpr size_t SettingsItemKeyLengthMax = 0x40;
struct SettingsName : sf::LargeData {
char value[util::AlignUp(SettingsNameLengthMax + 1, alignof(u64))];
};
static_assert(util::is_pod<SettingsName>::value && sizeof(SettingsName) > SettingsNameLengthMax);
struct SettingsItemKey : sf::LargeData {
char value[util::AlignUp(SettingsItemKeyLengthMax + 1, alignof(u64))];
};
static_assert(util::is_pod<SettingsItemKey>::value && sizeof(SettingsItemKey) > SettingsItemKeyLengthMax);
}
@@ -19,6 +19,21 @@
namespace ams::settings {
constexpr size_t SettingsNameLengthMax = 0x40;
constexpr size_t SettingsItemKeyLengthMax = 0x40;
struct SettingsName : public sf::LargeData {
char value[util::AlignUp(SettingsNameLengthMax + 1, alignof(u64))];
};
static_assert(util::is_pod<SettingsName>::value && sizeof(SettingsName) > SettingsNameLengthMax);
struct SettingsItemKey : public sf::LargeData {
char value[util::AlignUp(SettingsItemKeyLengthMax + 1, alignof(u64))];
};
static_assert(util::is_pod<SettingsItemKey>::value && sizeof(SettingsItemKey) > SettingsItemKeyLengthMax);
enum Language {
Language_Japanese,
Language_AmericanEnglish,