mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2024-12-23 10:52:13 +00:00
Merge branch 'master' of github.com:Atmosphere-NX/Atmosphere
This commit is contained in:
commit
16ccc8a241
3 changed files with 7 additions and 3 deletions
|
@ -210,6 +210,10 @@ T GetValueFromIpcParsedCommand(IpcParsedCommand& r, IpcCommand& out_c, u8 *point
|
||||||
} else if constexpr (std::is_same<T, PidDescriptor>::value) {
|
} else if constexpr (std::is_same<T, PidDescriptor>::value) {
|
||||||
cur_rawdata_index += sizeof(u64) / sizeof(u32);
|
cur_rawdata_index += sizeof(u64) / sizeof(u32);
|
||||||
return PidDescriptor(r.Pid);
|
return PidDescriptor(r.Pid);
|
||||||
|
} else if constexpr (std::is_same<T, bool>::value) {
|
||||||
|
/* Official bools accept non-zero values with low bit unset as false. */
|
||||||
|
cur_rawdata_index += size_in_raw_data<T>::value / sizeof(u32);
|
||||||
|
return ((*(((u32 *)r.Raw + old_rawdata_index))) & 1) == 1;
|
||||||
} else {
|
} else {
|
||||||
cur_rawdata_index += size_in_raw_data<T>::value / sizeof(u32);
|
cur_rawdata_index += size_in_raw_data<T>::value / sizeof(u32);
|
||||||
return *((T *)((u32 *)r.Raw + old_rawdata_index));
|
return *((T *)((u32 *)r.Raw + old_rawdata_index));
|
||||||
|
|
|
@ -230,7 +230,7 @@ Result Registration::RemoveNroInfo(u64 index, Handle process_h, u64 nro_heap_add
|
||||||
return 0xA809;
|
return 0xA809;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (unsigned int i = 0; i < NRR_INFO_MAX; i++) {
|
for (unsigned int i = 0; i < NRO_INFO_MAX; i++) {
|
||||||
if (target_process->nro_infos[i].in_use && target_process->nro_infos[i].nro_heap_address == nro_heap_address) {
|
if (target_process->nro_infos[i].in_use && target_process->nro_infos[i].nro_heap_address == nro_heap_address) {
|
||||||
NroInfo *info = &target_process->nro_infos[i];
|
NroInfo *info = &target_process->nro_infos[i];
|
||||||
Result rc = svcUnmapProcessCodeMemory(process_h, info->base_address + info->text_size + info->ro_size + info->rw_size, info->bss_heap_address, info->bss_heap_size);
|
Result rc = svcUnmapProcessCodeMemory(process_h, info->base_address + info->text_size + info->ro_size + info->rw_size, info->bss_heap_address, info->bss_heap_size);
|
||||||
|
|
|
@ -65,11 +65,11 @@ std::tuple<Result, MovedHandle> UserService::register_service(u64 service, u8 is
|
||||||
Result rc = 0x415;
|
Result rc = 0x415;
|
||||||
#ifdef SM_ENABLE_SMHAX
|
#ifdef SM_ENABLE_SMHAX
|
||||||
if (!this->has_initialized) {
|
if (!this->has_initialized) {
|
||||||
rc = Registration::RegisterServiceForPid(Registration::GetInitialProcessId(), service, max_sessions, is_light != 0, &service_h);
|
rc = Registration::RegisterServiceForPid(Registration::GetInitialProcessId(), service, max_sessions, (is_light & 1) != 0, &service_h);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
if (this->has_initialized) {
|
if (this->has_initialized) {
|
||||||
rc = Registration::RegisterServiceForPid(this->pid, service, max_sessions, is_light != 0, &service_h);
|
rc = Registration::RegisterServiceForPid(this->pid, service, max_sessions, (is_light & 1) != 0, &service_h);
|
||||||
}
|
}
|
||||||
return {rc, MovedHandle{service_h}};
|
return {rc, MovedHandle{service_h}};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue