mirror of
https://github.com/XLabsProject/s1x-client.git
synced 2023-08-02 15:02:12 +02:00
Remove loading the game as lib
This commit is contained in:
parent
7d559d5a31
commit
fc59e94f6a
@ -69,9 +69,9 @@ namespace game_module
|
||||
|
||||
DWORD __stdcall get_module_file_name_w(HMODULE hmodule, const LPWSTR filename, const DWORD size)
|
||||
{
|
||||
if (!hmodule || utils::nt::library(hmodule) == get_game_module())
|
||||
if (!hmodule)
|
||||
{
|
||||
hmodule = get_host_module();
|
||||
hmodule = get_game_module();
|
||||
}
|
||||
|
||||
return file_name_w_hook.invoke<DWORD>(hmodule, filename, size);
|
||||
@ -110,11 +110,7 @@ namespace game_module
|
||||
|
||||
void post_load() override
|
||||
{
|
||||
#ifdef INJECT_HOST_AS_LIB
|
||||
hook_module_resolving();
|
||||
#else
|
||||
assert(get_host_module() == get_game_module());
|
||||
#endif
|
||||
}
|
||||
};
|
||||
}
|
||||
|
@ -87,11 +87,7 @@ FARPROC load_binary(const launcher::mode mode)
|
||||
"Failed to read game binary (%s)!\nPlease copy the s1-mod.exe into your Call of Duty: Advanced Warfare installation folder and run it from there.", binary.data()));
|
||||
}
|
||||
|
||||
#ifdef INJECT_HOST_AS_LIB
|
||||
return loader.load_library(binary);
|
||||
#else
|
||||
return loader.load(self, data);
|
||||
#endif
|
||||
}
|
||||
|
||||
void remove_crash_file()
|
||||
|
@ -1,13 +1,3 @@
|
||||
#include <std_include.hpp>
|
||||
|
||||
#ifdef INJECT_HOST_AS_LIB
|
||||
#pragma comment(linker, "/base:0x160000000")
|
||||
#else
|
||||
#pragma comment(linker, "/base:0x140000000")
|
||||
#endif
|
||||
|
||||
#ifndef INJECT_HOST_AS_LIB
|
||||
#pragma bss_seg(".payload")
|
||||
char payload_data[BINARY_PAYLOAD_SIZE];
|
||||
#endif
|
||||
|
||||
#pragma comment(linker, "/base:0x160000000")
|
@ -2,9 +2,6 @@
|
||||
|
||||
#define BINARY_PAYLOAD_SIZE 0x12000000
|
||||
|
||||
// Decide whether to load the game as lib or to inject it
|
||||
#define INJECT_HOST_AS_LIB
|
||||
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable: 4100)
|
||||
#pragma warning(disable: 4127)
|
||||
|
Loading…
Reference in New Issue
Block a user