android: Add cpu bakend gui toggle

This commit is contained in:
GPUCode 2023-11-18 16:10:39 +02:00 committed by t895
parent 9f91ba1f73
commit 8fab363237
11 changed files with 43 additions and 9 deletions

View file

@ -129,8 +129,10 @@ AppLoader_DeconstructedRomDirectory::LoadResult AppLoader_DeconstructedRomDirect
}
metadata.Print();
// Enable NCE only for 64-bit programs.
Settings::SetNceEnabled(metadata.Is64BitProgram());
// Enable NCE only for programs with 39-bit address space.
const bool is_39bit =
metadata.GetAddressSpaceType() == FileSys::ProgramAddressSpaceType::Is39Bit;
Settings::SetNceEnabled(is_39bit);
const std::array static_modules = {"rtld", "main", "subsdk0", "subsdk1", "subsdk2",
"subsdk3", "subsdk4", "subsdk5", "subsdk6", "subsdk7",

View file

@ -199,6 +199,7 @@ static bool LoadNroImpl(Core::System& system, Kernel::KProcess& process,
codeset.DataSegment().size += bss_size;
program_image.resize(static_cast<u32>(program_image.size()) + bss_size);
size_t image_size = program_image.size();
#ifdef ARCHITECTURE_arm64
const auto& code = codeset.CodeSegment();
@ -208,7 +209,6 @@ static bool LoadNroImpl(Core::System& system, Kernel::KProcess& process,
// Create NCE patcher
Core::NCE::Patcher patch{};
size_t image_size = program_image.size();
if (Settings::IsNceEnabled()) {
// Patch SVCs and MRS calls in the guest code