summaryrefslogtreecommitdiffstats
path: root/src/core/loader/deconstructed_rom_directory.cpp
diff options
context:
space:
mode:
authorFernando S <fsahmkow27@gmail.com>2023-12-24 16:23:14 +0100
committerGitHub <noreply@github.com>2023-12-24 16:23:14 +0100
commit05e3db3ac9edbff0e4885ef8b42d3a2427c9f027 (patch)
tree2f959b67638ab1134cfca19ac1f041552a68c335 /src/core/loader/deconstructed_rom_directory.cpp
parentMerge pull request #12412 from ameerj/gl-query-prims (diff)
parentkernel: fix resource limit imbalance (diff)
downloadyuzu-05e3db3ac9edbff0e4885ef8b42d3a2427c9f027.tar
yuzu-05e3db3ac9edbff0e4885ef8b42d3a2427c9f027.tar.gz
yuzu-05e3db3ac9edbff0e4885ef8b42d3a2427c9f027.tar.bz2
yuzu-05e3db3ac9edbff0e4885ef8b42d3a2427c9f027.tar.lz
yuzu-05e3db3ac9edbff0e4885ef8b42d3a2427c9f027.tar.xz
yuzu-05e3db3ac9edbff0e4885ef8b42d3a2427c9f027.tar.zst
yuzu-05e3db3ac9edbff0e4885ef8b42d3a2427c9f027.zip
Diffstat (limited to 'src/core/loader/deconstructed_rom_directory.cpp')
-rw-r--r--src/core/loader/deconstructed_rom_directory.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/core/loader/deconstructed_rom_directory.cpp b/src/core/loader/deconstructed_rom_directory.cpp
index 60ee78e89..c9f8707b7 100644
--- a/src/core/loader/deconstructed_rom_directory.cpp
+++ b/src/core/loader/deconstructed_rom_directory.cpp
@@ -129,9 +129,10 @@ AppLoader_DeconstructedRomDirectory::LoadResult AppLoader_DeconstructedRomDirect
}
metadata.Print();
- // Enable NCE only for programs with 39-bit address space.
+ // Enable NCE only for applications with 39-bit address space.
const bool is_39bit =
metadata.GetAddressSpaceType() == FileSys::ProgramAddressSpaceType::Is39Bit;
+ const bool is_application = metadata.GetPoolPartition() == FileSys::PoolPartition::Application;
Settings::SetNceEnabled(is_39bit);
const std::array static_modules = {"rtld", "main", "subsdk0", "subsdk1", "subsdk2",
@@ -147,7 +148,7 @@ AppLoader_DeconstructedRomDirectory::LoadResult AppLoader_DeconstructedRomDirect
const auto GetPatcher = [&](size_t i) -> Core::NCE::Patcher* {
#ifdef HAS_NCE
- if (Settings::IsNceEnabled()) {
+ if (is_application && Settings::IsNceEnabled()) {
return &module_patchers[i];
}
#endif
@@ -175,7 +176,7 @@ AppLoader_DeconstructedRomDirectory::LoadResult AppLoader_DeconstructedRomDirect
// Enable direct memory mapping in case of NCE.
const u64 fastmem_base = [&]() -> size_t {
- if (Settings::IsNceEnabled()) {
+ if (is_application && Settings::IsNceEnabled()) {
auto& buffer = system.DeviceMemory().buffer;
buffer.EnableDirectMappedAddress();
return reinterpret_cast<u64>(buffer.VirtualBasePointer());