launcher: add local game patches (#111)

launcher: add game patches
This commit is contained in:
nmzik
2026-07-27 16:19:31 +02:00
committed by GitHub
parent 31ea0081a9
commit f60f80b631
14 changed files with 497 additions and 14 deletions
+5 -1
View File
@@ -17,6 +17,7 @@
#include "kernel/memory.h"
#include "kernel/pthread.h"
#include "loader/elf.h"
#include "loader/gamePatch.h"
#include "loader/jit.h"
#include "loader/symbolDatabase.h"
#include "loader/x64InstructionEmulator.h"
@@ -1326,7 +1327,7 @@ void RuntimeLinker::SaveProgram(Program* program, const std::filesystem::path& e
}
}
void RuntimeLinker::Execute() {
void RuntimeLinker::Execute(const std::filesystem::path& game_patch) {
KYTY_PROFILER_THREAD("Thread_Main");
Libs::LibKernel::PthreadInitSelfForMainThread();
@@ -1346,6 +1347,9 @@ void RuntimeLinker::Execute() {
PreloadAdjacentPrograms();
RelocateAll();
if (!game_patch.empty()) {
GamePatch::Apply(game_patch, m_programs.empty() ? nullptr : m_programs.front());
}
StartAllModules();
LOGF_COLOR(Log::Color::BrightYellow, "---\n--- Execute: %s\n---\n", "Main");