1
0
Fork 0
forked from suyu/suyu

Merge pull request #7320 from OatmealDome/homebrew-capabilities

program_metadata: Add default ThreadInfo capability
This commit is contained in:
Mai M 2021-11-11 00:26:59 -05:00 committed by GitHub
commit 852858c2cb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -53,13 +53,16 @@ Loader::ResultStatus ProgramMetadata::Load(VirtualFile file) {
} }
/*static*/ ProgramMetadata ProgramMetadata::GetDefault() { /*static*/ ProgramMetadata ProgramMetadata::GetDefault() {
// Allow use of cores 0~3 and thread priorities 1~63.
constexpr u32 default_thread_info_capability = 0x30007F7;
ProgramMetadata result; ProgramMetadata result;
result.LoadManual( result.LoadManual(
true /*is_64_bit*/, FileSys::ProgramAddressSpaceType::Is39Bit /*address_space*/, true /*is_64_bit*/, FileSys::ProgramAddressSpaceType::Is39Bit /*address_space*/,
0x2c /*main_thread_prio*/, 0 /*main_thread_core*/, 0x00100000 /*main_thread_stack_size*/, 0x2c /*main_thread_prio*/, 0 /*main_thread_core*/, 0x00100000 /*main_thread_stack_size*/,
0 /*title_id*/, 0xFFFFFFFFFFFFFFFF /*filesystem_permissions*/, 0 /*title_id*/, 0xFFFFFFFFFFFFFFFF /*filesystem_permissions*/,
0x1FE00000 /*system_resource_size*/, {} /*capabilities*/); 0x1FE00000 /*system_resource_size*/, {default_thread_info_capability} /*capabilities*/);
return result; return result;
} }