mirror of
https://github.com/djhackersdev/bemanitools.git
synced 2024-11-14 10:17:38 +01:00
Force game to always think a debugger isn't present
This commit is contained in:
parent
050e52b21e
commit
c1c5685e3a
@ -12,8 +12,10 @@
|
||||
#include "util/log.h"
|
||||
|
||||
static HMODULE(STDCALL *real_LoadLibraryA)(const char *name);
|
||||
static BOOL(STDCALL *real_IsDebuggerPresent)();
|
||||
|
||||
static HMODULE STDCALL my_LoadLibraryA(const char *name);
|
||||
static BOOL STDCALL my_IsDebuggerPresent();
|
||||
|
||||
static const struct hook_symbol master_kernel32_syms[] = {
|
||||
{
|
||||
@ -21,8 +23,23 @@ static const struct hook_symbol master_kernel32_syms[] = {
|
||||
.patch = my_LoadLibraryA,
|
||||
.link = (void **) &real_LoadLibraryA,
|
||||
},
|
||||
{
|
||||
.name = "IsDebuggerPresent",
|
||||
.patch = my_IsDebuggerPresent,
|
||||
.link = (void **) &real_IsDebuggerPresent,
|
||||
},
|
||||
};
|
||||
|
||||
static BOOL STDCALL my_IsDebuggerPresent()
|
||||
{
|
||||
// DDR X has different code paths for when a debugger is attached,
|
||||
// but we want the normal path and not the debugger path.
|
||||
// The biggest noticeable difference is that when a debugger is attached
|
||||
// it will show fway.mpg (a car driving) instead of the sky background
|
||||
// on the menus.
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static HMODULE STDCALL my_LoadLibraryA(const char *name)
|
||||
{
|
||||
HMODULE result;
|
||||
|
Loading…
Reference in New Issue
Block a user