diff --git a/libraries/libstratosphere/Makefile b/libraries/libstratosphere/Makefile index 4d302b467..37bac54f2 100644 --- a/libraries/libstratosphere/Makefile +++ b/libraries/libstratosphere/Makefile @@ -123,6 +123,7 @@ $(OFILES) : $(GCH_FILES) $(OFILES_SRC) : $(HFILES_BIN) ams_environment_weak.o: CXXFLAGS += -fno-lto +pm_info_api_weak.o: CXXFLAGS += -fno-lto #--------------------------------------------------------------------------------- %_bin.h %.bin.o : %.bin diff --git a/libraries/libstratosphere/source/pm/pm_info_api.cpp b/libraries/libstratosphere/source/pm/pm_info_api.cpp index e1d7998c4..c4361d7b1 100644 --- a/libraries/libstratosphere/source/pm/pm_info_api.cpp +++ b/libraries/libstratosphere/source/pm/pm_info_api.cpp @@ -34,13 +34,6 @@ namespace ams::pm::info { return pminfoAtmosphereGetProcessInfo(reinterpret_cast(out_loc), reinterpret_cast(out_status), static_cast(process_id)); } - Result WEAK_SYMBOL HasLaunchedBootProgram(bool *out, ncm::ProgramId program_id) { - bool has_launched = false; - R_TRY(pminfoAtmosphereHasLaunchedBootProgram(&has_launched, static_cast(program_id))); - *out = has_launched; - return ResultSuccess(); - } - bool HasLaunchedBootProgram(ncm::ProgramId program_id) { bool has_launched = false; R_ABORT_UNLESS(HasLaunchedBootProgram(&has_launched, program_id)); diff --git a/libraries/libstratosphere/source/pm/pm_info_api_weak.cpp b/libraries/libstratosphere/source/pm/pm_info_api_weak.cpp new file mode 100644 index 000000000..f1d61ea0b --- /dev/null +++ b/libraries/libstratosphere/source/pm/pm_info_api_weak.cpp @@ -0,0 +1,29 @@ +/* + * Copyright (c) 2018-2020 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 . + */ +#include +#include "pm_ams.h" + +namespace ams::pm::info { + + /* Information API. */ + Result WEAK_SYMBOL HasLaunchedBootProgram(bool *out, ncm::ProgramId program_id) { + bool has_launched = false; + R_TRY(pminfoAtmosphereHasLaunchedBootProgram(&has_launched, static_cast(program_id))); + *out = has_launched; + return ResultSuccess(); + } + +}