2023-05-10 05:12:00 +00:00
|
|
|
/*
|
|
|
|
* Copyright (c) Atmosphère-NX
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or modify it
|
|
|
|
* under the terms and conditions of the GNU General Public License,
|
|
|
|
* version 2, as published by the Free Software Foundation.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope it will be useful, but WITHOUT
|
|
|
|
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
|
|
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
|
|
|
* more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
*/
|
|
|
|
#include <stratosphere.hpp>
|
|
|
|
#include "../amsmitm_initialization.hpp"
|
|
|
|
#include "mitm_pm_service.hpp"
|
2023-05-10 06:47:25 +00:00
|
|
|
#include "mitm_pm_service.hpp"
|
|
|
|
#include "../fs_mitm/fsmitm_romfs.hpp"
|
2023-05-10 05:12:00 +00:00
|
|
|
|
|
|
|
namespace ams::mitm::pm {
|
|
|
|
|
|
|
|
Result PmService::PrepareLaunchProgram(sf::Out<u64> out, ncm::ProgramId program_id, const cfg::OverrideStatus &status, bool is_application) {
|
2023-05-10 06:47:25 +00:00
|
|
|
/* Default to zero heap. */
|
2023-05-10 05:12:00 +00:00
|
|
|
*out = 0;
|
2023-05-10 06:47:25 +00:00
|
|
|
|
|
|
|
/* Actually configure the required boost size for romfs. */
|
|
|
|
R_TRY(mitm::fs::romfs::ConfigureDynamicHeap(out.GetPointer(), program_id, status, is_application));
|
|
|
|
|
|
|
|
/* TODO: Is there anything else we should do, while we have the opportunity? */
|
2023-05-10 05:12:00 +00:00
|
|
|
R_SUCCEED();
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|