[Kernel] Improved TUs Support

- Changed name of config option to apply_title_update to better reflect what that option does
- Mount TU package to UPDATE: partition
- Simplified UserModule::title_id()
- Splitted loading module into two parts to allow applying TUs and custom patches
This commit is contained in:
Gliniak
2022-04-30 14:38:42 +02:00
parent 0fd578cafd
commit c65f240c0b
8 changed files with 132 additions and 59 deletions

View File

@@ -58,6 +58,9 @@ class UserModule : public XModule {
uint32_t guest_xex_header() const { return guest_xex_header_; }
// The title ID in the xex header or 0 if this is not a xex.
uint32_t title_id() const;
uint32_t disc_number() const;
bool is_multi_disc_title() const;
bool is_executable() const { return processor_module_->is_executable(); }
bool is_dll_module() const { return is_dll_module_; }
@@ -66,6 +69,7 @@ class UserModule : public XModule {
X_STATUS LoadFromFile(const std::string_view path);
X_STATUS LoadFromMemory(const void* addr, const size_t length);
X_STATUS LoadContinue();
X_STATUS Unload();
uint32_t GetProcAddressByOrdinal(uint16_t ordinal) override;
@@ -96,8 +100,6 @@ class UserModule : public XModule {
const std::string_view path);
private:
X_STATUS LoadXexContinue();
std::string name_;
std::string path_;