summaryrefslogtreecommitdiffstats
path: root/src/core/file_sys
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2020-04-21 00:15:52 +0200
committerbunnei <bunneidev@gmail.com>2020-04-21 00:19:45 +0200
commitf0a7f050705734561311180adf1876ab392db61a (patch)
treea7a7e8cbacdf3b50690d34e426f77075cdedbfe8 /src/core/file_sys
parentMerge pull request #3739 from MerryMage/disable_cpu_opt (diff)
downloadyuzu-f0a7f050705734561311180adf1876ab392db61a.tar
yuzu-f0a7f050705734561311180adf1876ab392db61a.tar.gz
yuzu-f0a7f050705734561311180adf1876ab392db61a.tar.bz2
yuzu-f0a7f050705734561311180adf1876ab392db61a.tar.lz
yuzu-f0a7f050705734561311180adf1876ab392db61a.tar.xz
yuzu-f0a7f050705734561311180adf1876ab392db61a.tar.zst
yuzu-f0a7f050705734561311180adf1876ab392db61a.zip
Diffstat (limited to 'src/core/file_sys')
-rw-r--r--src/core/file_sys/program_metadata.cpp11
-rw-r--r--src/core/file_sys/program_metadata.h6
2 files changed, 16 insertions, 1 deletions
diff --git a/src/core/file_sys/program_metadata.cpp b/src/core/file_sys/program_metadata.cpp
index 1d6c30962..43169bf9f 100644
--- a/src/core/file_sys/program_metadata.cpp
+++ b/src/core/file_sys/program_metadata.cpp
@@ -51,6 +51,17 @@ Loader::ResultStatus ProgramMetadata::Load(VirtualFile file) {
return Loader::ResultStatus::Success;
}
+/*static*/ ProgramMetadata ProgramMetadata::GetDefault() {
+ ProgramMetadata result;
+
+ result.LoadManual(
+ true /*is_64_bit*/, FileSys::ProgramAddressSpaceType::Is39Bit /*address_space*/,
+ 0x2c /*main_thread_prio*/, 0 /*main_thread_core*/, 0x00100000 /*main_thread_stack_size*/,
+ {}, 0xFFFFFFFFFFFFFFFF /*filesystem_permissions*/, {} /*capabilities*/);
+
+ return result;
+}
+
void ProgramMetadata::LoadManual(bool is_64_bit, ProgramAddressSpaceType address_space,
s32 main_thread_prio, u32 main_thread_core,
u32 main_thread_stack_size, u64 title_id,
diff --git a/src/core/file_sys/program_metadata.h b/src/core/file_sys/program_metadata.h
index f8759a396..35069972b 100644
--- a/src/core/file_sys/program_metadata.h
+++ b/src/core/file_sys/program_metadata.h
@@ -44,9 +44,13 @@ public:
ProgramMetadata();
~ProgramMetadata();
+ /// Gets a default ProgramMetadata configuration, should only be used for homebrew formats where
+ /// we do not have an NPDM file
+ static ProgramMetadata GetDefault();
+
Loader::ResultStatus Load(VirtualFile file);
- // Load from parameters instead of NPDM file, used for KIP
+ /// Load from parameters instead of NPDM file, used for KIP
void LoadManual(bool is_64_bit, ProgramAddressSpaceType address_space, s32 main_thread_prio,
u32 main_thread_core, u32 main_thread_stack_size, u64 title_id,
u64 filesystem_permissions, KernelCapabilityDescriptors capabilities);