Make plugins only load for apps and not applets (#265)

This commit is contained in:
PabloMK7 2024-09-28 11:26:13 +00:00 committed by GitHub
parent 608383ec84
commit 7d00f47c5e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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;
}
{