loader; Resolve sign conversion/truncation errors
This commit is contained in:
parent
86a1eb7789
commit
23878bf360
3 changed files with 6 additions and 6 deletions
|
@ -147,7 +147,7 @@ std::vector<u32> KIP::GetKernelCapabilities() const {
|
||||||
}
|
}
|
||||||
|
|
||||||
s32 KIP::GetMainThreadPriority() const {
|
s32 KIP::GetMainThreadPriority() const {
|
||||||
return header.main_thread_priority;
|
return static_cast<s32>(header.main_thread_priority);
|
||||||
}
|
}
|
||||||
|
|
||||||
u32 KIP::GetMainThreadStackSize() const {
|
u32 KIP::GetMainThreadStackSize() const {
|
||||||
|
|
|
@ -52,14 +52,14 @@ Loader::ResultStatus ProgramMetadata::Load(VirtualFile file) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void ProgramMetadata::LoadManual(bool is_64_bit, ProgramAddressSpaceType address_space,
|
void ProgramMetadata::LoadManual(bool is_64_bit, ProgramAddressSpaceType address_space,
|
||||||
u8 main_thread_prio, u8 main_thread_core,
|
s32 main_thread_prio, u32 main_thread_core,
|
||||||
u32 main_thread_stack_size, u64 title_id,
|
u32 main_thread_stack_size, u64 title_id,
|
||||||
u64 filesystem_permissions,
|
u64 filesystem_permissions,
|
||||||
KernelCapabilityDescriptors capabilities) {
|
KernelCapabilityDescriptors capabilities) {
|
||||||
npdm_header.has_64_bit_instructions.Assign(is_64_bit);
|
npdm_header.has_64_bit_instructions.Assign(is_64_bit);
|
||||||
npdm_header.address_space_type.Assign(address_space);
|
npdm_header.address_space_type.Assign(address_space);
|
||||||
npdm_header.main_thread_priority = main_thread_prio;
|
npdm_header.main_thread_priority = static_cast<u8>(main_thread_prio);
|
||||||
npdm_header.main_thread_cpu = main_thread_core;
|
npdm_header.main_thread_cpu = static_cast<u8>(main_thread_core);
|
||||||
npdm_header.main_stack_size = main_thread_stack_size;
|
npdm_header.main_stack_size = main_thread_stack_size;
|
||||||
aci_header.title_id = title_id;
|
aci_header.title_id = title_id;
|
||||||
aci_file_access.permissions = filesystem_permissions;
|
aci_file_access.permissions = filesystem_permissions;
|
||||||
|
|
|
@ -47,8 +47,8 @@ public:
|
||||||
Loader::ResultStatus Load(VirtualFile file);
|
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, u8 main_thread_prio,
|
void LoadManual(bool is_64_bit, ProgramAddressSpaceType address_space, s32 main_thread_prio,
|
||||||
u8 main_thread_core, u32 main_thread_stack_size, u64 title_id,
|
u32 main_thread_core, u32 main_thread_stack_size, u64 title_id,
|
||||||
u64 filesystem_permissions, KernelCapabilityDescriptors capabilities);
|
u64 filesystem_permissions, KernelCapabilityDescriptors capabilities);
|
||||||
|
|
||||||
bool Is64BitProgram() const;
|
bool Is64BitProgram() const;
|
||||||
|
|
Loading…
Reference in a new issue