pm/mitm: okay, that api won't work, try a different one
This commit is contained in:
@@ -244,6 +244,22 @@ namespace ams::pm::impl {
|
||||
/* If we fail after now, unpin. */
|
||||
ON_RESULT_FAILURE { ldr::pm::UnpinProgram(pin_id); };
|
||||
|
||||
/* Ensure we can talk to mitm services. */
|
||||
{
|
||||
AMS_FUNCTION_LOCAL_STATIC_CONSTINIT(bool, s_initialized_mitm, false);
|
||||
if (!s_initialized_mitm) {
|
||||
mitm::pm::Initialize();
|
||||
s_initialized_mitm = true;
|
||||
}
|
||||
}
|
||||
|
||||
/* Determine boost size for mitm. */
|
||||
u64 mitm_boost_size = 0;
|
||||
R_TRY(mitm::pm::PrepareLaunchProgram(std::addressof(mitm_boost_size), program_info.program_id, override_status, is_application));
|
||||
|
||||
R_ABORT_UNLESS(BoostSystemMemoryResourceLimitForMitm(mitm_boost_size));
|
||||
ON_RESULT_FAILURE_2 { R_ABORT_UNLESS(BoostSystemMemoryResourceLimitForMitm(0)); };
|
||||
|
||||
/* Ensure resources are available. */
|
||||
resource::WaitResourceAvailable(std::addressof(program_info));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user