summaryrefslogtreecommitdiff
path: root/src/core/loader/nso.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/loader/nso.cpp')
-rw-r--r--src/core/loader/nso.cpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/core/loader/nso.cpp b/src/core/loader/nso.cpp
index 1e70f6e11..95b6f339a 100644
--- a/src/core/loader/nso.cpp
+++ b/src/core/loader/nso.cpp
@@ -14,10 +14,10 @@
14#include "common/swap.h" 14#include "common/swap.h"
15#include "core/core.h" 15#include "core/core.h"
16#include "core/file_sys/patch_manager.h" 16#include "core/file_sys/patch_manager.h"
17#include "core/gdbstub/gdbstub.h"
18#include "core/hle/kernel/code_set.h" 17#include "core/hle/kernel/code_set.h"
19#include "core/hle/kernel/memory/page_table.h" 18#include "core/hle/kernel/memory/page_table.h"
20#include "core/hle/kernel/process.h" 19#include "core/hle/kernel/process.h"
20#include "core/hle/kernel/thread.h"
21#include "core/loader/nso.h" 21#include "core/loader/nso.h"
22#include "core/memory.h" 22#include "core/memory.h"
23#include "core/settings.h" 23#include "core/settings.h"
@@ -47,7 +47,7 @@ std::vector<u8> DecompressSegment(const std::vector<u8>& compressed_data,
47} 47}
48 48
49constexpr u32 PageAlignSize(u32 size) { 49constexpr u32 PageAlignSize(u32 size) {
50 return (size + Core::Memory::PAGE_MASK) & ~Core::Memory::PAGE_MASK; 50 return static_cast<u32>((size + Core::Memory::PAGE_MASK) & ~Core::Memory::PAGE_MASK);
51} 51}
52} // Anonymous namespace 52} // Anonymous namespace
53 53
@@ -149,7 +149,7 @@ std::optional<VAddr> AppLoader_NSO::LoadModule(Kernel::Process& process, Core::S
149 // Apply cheats if they exist and the program has a valid title ID 149 // Apply cheats if they exist and the program has a valid title ID
150 if (pm) { 150 if (pm) {
151 system.SetCurrentProcessBuildID(nso_header.build_id); 151 system.SetCurrentProcessBuildID(nso_header.build_id);
152 const auto cheats = pm->CreateCheatList(system, nso_header.build_id); 152 const auto cheats = pm->CreateCheatList(nso_header.build_id);
153 if (!cheats.empty()) { 153 if (!cheats.empty()) {
154 system.RegisterCheatList(cheats, nso_header.build_id, load_base, image_size); 154 system.RegisterCheatList(cheats, nso_header.build_id, load_base, image_size);
155 } 155 }
@@ -159,9 +159,6 @@ std::optional<VAddr> AppLoader_NSO::LoadModule(Kernel::Process& process, Core::S
159 codeset.memory = std::move(program_image); 159 codeset.memory = std::move(program_image);
160 process.LoadModule(std::move(codeset), load_base); 160 process.LoadModule(std::move(codeset), load_base);
161 161
162 // Register module with GDBStub
163 GDBStub::RegisterModule(file.GetName(), load_base, load_base);
164
165 return load_base + image_size; 162 return load_base + image_size;
166} 163}
167 164