mirror of
https://github.com/KytyPS5/KytyPS5.git
synced 2026-10-23 04:16:57 +02:00
loader: add support for etaHEN cheats
This commit is contained in:
@@ -1289,6 +1289,9 @@ void RuntimeLinker::RelocateProgram(Program* program) {
|
||||
EXIT_IF(std::find(m_programs.begin(), m_programs.end(), program) == m_programs.end());
|
||||
|
||||
Relocate(program);
|
||||
if (!GamePatch::ApplyPending(program)) {
|
||||
EXIT("Failed to apply pending game cheat\n");
|
||||
}
|
||||
}
|
||||
|
||||
void RuntimeLinker::UnloadProgram(Program* program) {
|
||||
@@ -1412,7 +1415,10 @@ void RuntimeLinker::Execute(const std::filesystem::path& game_patch) {
|
||||
RelocateAll();
|
||||
|
||||
if (!game_patch.empty()) {
|
||||
GamePatch::Apply(game_patch, m_programs.empty() ? nullptr : m_programs.front());
|
||||
if (!GamePatch::Apply(game_patch, m_programs.empty() ? nullptr : m_programs.front(),
|
||||
m_programs)) {
|
||||
EXIT("Failed to apply game cheat\n");
|
||||
}
|
||||
}
|
||||
StartAllModules();
|
||||
|
||||
@@ -1436,6 +1442,7 @@ void RuntimeLinker::Clear() {
|
||||
// EXIT_NOT_IMPLEMENTED(!Common::Thread::IsMainThread());
|
||||
|
||||
Common::LockGuard lock(m_mutex);
|
||||
GamePatch::Clear();
|
||||
|
||||
for (auto* p: m_programs) {
|
||||
DeleteProgram(p);
|
||||
|
||||
Reference in New Issue
Block a user