Skip to content
This repository was archived by the owner on Oct 29, 2024. It is now read-only.

Make plugins only load for apps and not applets #265

Merged
merged 1 commit into from
Sep 28, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion src/core/hle/service/plgldr/plgldr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,11 @@ void PLG_LDR::serialize(Archive& ar, const unsigned int) {
SERIALIZE_IMPL(PLG_LDR)

void PLG_LDR::OnProcessRun(Kernel::Process& process, Kernel::KernelSystem& kernel) {
if (!plgldr_context.is_enabled || plgldr_context.plugin_loaded) {
constexpr u32 TITLE_ID_APP_MASK = 0xFFFFFFED;
constexpr u32 TITLE_ID_APP_VALUE = 0x04000000;
if (!plgldr_context.is_enabled || plgldr_context.plugin_loaded ||
(static_cast<u32>(process.codeset->program_id >> 32) & TITLE_ID_APP_MASK) !=
TITLE_ID_APP_VALUE) {
return;
}
{
Expand Down