mirror of
https://github.com/PabloMK7/citra.git
synced 2025-09-12 05:40:04 +00:00
Serialize CECD, CFG services
This commit is contained in:
parent
ef2e503281
commit
2d2c7218ef
23 changed files with 135 additions and 16 deletions
|
@ -6,6 +6,7 @@
|
|||
#include <tuple>
|
||||
#include <cryptopp/osrng.h>
|
||||
#include <cryptopp/sha.h>
|
||||
#include "common/archives.h"
|
||||
#include "common/common_paths.h"
|
||||
#include "common/file_util.h"
|
||||
#include "common/logging/log.h"
|
||||
|
@ -24,8 +25,18 @@
|
|||
#include "core/hle/service/cfg/cfg_u.h"
|
||||
#include "core/settings.h"
|
||||
|
||||
SERIALIZE_EXPORT_IMPL(Service::CFG::Module)
|
||||
|
||||
namespace Service::CFG {
|
||||
|
||||
template <class Archive>
|
||||
void Module::serialize(Archive& ar, const unsigned int) {
|
||||
ar& cfg_config_file_buffer;
|
||||
ar& cfg_system_save_data_archive;
|
||||
ar& preferred_region_code;
|
||||
}
|
||||
SERIALIZE_IMPL(Module)
|
||||
|
||||
/// The maximum number of block entries that can exist in the config file
|
||||
static const u32 CONFIG_FILE_MAX_BLOCK_ENTRIES = 1479;
|
||||
|
||||
|
|
|
@ -244,7 +244,7 @@ public:
|
|||
(this->*function)(ctx, id);
|
||||
}
|
||||
|
||||
private:
|
||||
protected:
|
||||
std::shared_ptr<Module> cfg;
|
||||
};
|
||||
|
||||
|
@ -426,6 +426,10 @@ private:
|
|||
std::array<u8, CONFIG_SAVEFILE_SIZE> cfg_config_file_buffer;
|
||||
std::unique_ptr<FileSys::ArchiveBackend> cfg_system_save_data_archive;
|
||||
u32 preferred_region_code = 0;
|
||||
|
||||
template <class Archive>
|
||||
void serialize(Archive& ar, const unsigned int);
|
||||
friend class boost::serialization::access;
|
||||
};
|
||||
|
||||
std::shared_ptr<Module> GetModule(Core::System& system);
|
||||
|
@ -436,3 +440,5 @@ void InstallInterfaces(Core::System& system);
|
|||
std::string GetConsoleIdHash(Core::System& system);
|
||||
|
||||
} // namespace Service::CFG
|
||||
|
||||
BOOST_CLASS_EXPORT_KEY(Service::CFG::Module)
|
||||
|
|
|
@ -2,8 +2,11 @@
|
|||
// Licensed under GPLv2 or any later version
|
||||
// Refer to the license.txt file included.
|
||||
|
||||
#include "common/archives.h"
|
||||
#include "core/hle/service/cfg/cfg_i.h"
|
||||
|
||||
SERIALIZE_EXPORT_IMPL(Service::CFG::CFG_I)
|
||||
|
||||
namespace Service::CFG {
|
||||
|
||||
CFG_I::CFG_I(std::shared_ptr<Module> cfg) : Module::Interface(std::move(cfg), "cfg:i", 23) {
|
||||
|
|
|
@ -11,6 +11,12 @@ namespace Service::CFG {
|
|||
class CFG_I final : public Module::Interface {
|
||||
public:
|
||||
explicit CFG_I(std::shared_ptr<Module> cfg);
|
||||
|
||||
private:
|
||||
SERVICE_SERIALIZATION(CFG_I, cfg, Module)
|
||||
};
|
||||
|
||||
} // namespace Service::CFG
|
||||
|
||||
BOOST_CLASS_EXPORT_KEY(Service::CFG::CFG_I)
|
||||
BOOST_SERIALIZATION_CONSTRUCT(Service::CFG::CFG_I)
|
||||
|
|
|
@ -2,8 +2,11 @@
|
|||
// Licensed under GPLv2 or any later version
|
||||
// Refer to the license.txt file included.
|
||||
|
||||
#include "common/archives.h"
|
||||
#include "core/hle/service/cfg/cfg_nor.h"
|
||||
|
||||
SERIALIZE_EXPORT_IMPL(Service::CFG::CFG_NOR)
|
||||
|
||||
namespace Service::CFG {
|
||||
|
||||
CFG_NOR::CFG_NOR() : ServiceFramework("cfg:nor", 23) {
|
||||
|
|
|
@ -14,3 +14,5 @@ public:
|
|||
};
|
||||
|
||||
} // namespace Service::CFG
|
||||
|
||||
BOOST_CLASS_EXPORT_KEY(Service::CFG::CFG_NOR)
|
||||
|
|
|
@ -2,8 +2,11 @@
|
|||
// Licensed under GPLv2 or any later version
|
||||
// Refer to the license.txt file included.
|
||||
|
||||
#include "common/archives.h"
|
||||
#include "core/hle/service/cfg/cfg_s.h"
|
||||
|
||||
SERIALIZE_EXPORT_IMPL(Service::CFG::CFG_S)
|
||||
|
||||
namespace Service::CFG {
|
||||
|
||||
CFG_S::CFG_S(std::shared_ptr<Module> cfg) : Module::Interface(std::move(cfg), "cfg:s", 23) {
|
||||
|
|
|
@ -11,6 +11,12 @@ namespace Service::CFG {
|
|||
class CFG_S final : public Module::Interface {
|
||||
public:
|
||||
explicit CFG_S(std::shared_ptr<Module> cfg);
|
||||
|
||||
private:
|
||||
SERVICE_SERIALIZATION(CFG_S, cfg, Module)
|
||||
};
|
||||
|
||||
} // namespace Service::CFG
|
||||
|
||||
BOOST_CLASS_EXPORT_KEY(Service::CFG::CFG_S)
|
||||
BOOST_SERIALIZATION_CONSTRUCT(Service::CFG::CFG_S)
|
||||
|
|
|
@ -2,8 +2,11 @@
|
|||
// Licensed under GPLv2 or any later version
|
||||
// Refer to the license.txt file included.
|
||||
|
||||
#include "common/archives.h"
|
||||
#include "core/hle/service/cfg/cfg_u.h"
|
||||
|
||||
SERIALIZE_EXPORT_IMPL(Service::CFG::CFG_U)
|
||||
|
||||
namespace Service::CFG {
|
||||
|
||||
CFG_U::CFG_U(std::shared_ptr<Module> cfg) : Module::Interface(std::move(cfg), "cfg:u", 23) {
|
||||
|
|
|
@ -11,6 +11,12 @@ namespace Service::CFG {
|
|||
class CFG_U final : public Module::Interface {
|
||||
public:
|
||||
explicit CFG_U(std::shared_ptr<Module> cfg);
|
||||
|
||||
private:
|
||||
SERVICE_SERIALIZATION(CFG_U, cfg, Module)
|
||||
};
|
||||
|
||||
} // namespace Service::CFG
|
||||
|
||||
BOOST_CLASS_EXPORT_KEY(Service::CFG::CFG_U)
|
||||
BOOST_SERIALIZATION_CONSTRUCT(Service::CFG::CFG_U)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue