diff options
| author | ptitSeb <sebastien.chev@gmail.com> | 2023-02-18 15:06:40 +0100 |
|---|---|---|
| committer | ptitSeb <sebastien.chev@gmail.com> | 2023-02-18 15:06:40 +0100 |
| commit | 9705d5e38bdf4ec72daf480de0830dfde6e33a70 (patch) | |
| tree | 3c64f69ae2c5569bfe0fa91f321149ce49991c02 /src/main.c | |
| parent | 2e59b56f1691227e4a93ac1c2dd844adcc6334cd (diff) | |
| download | box64-9705d5e38bdf4ec72daf480de0830dfde6e33a70.tar.gz box64-9705d5e38bdf4ec72daf480de0830dfde6e33a70.zip | |
Preliminary work to get steamwebhelper working
Diffstat (limited to 'src/main.c')
| -rwxr-xr-x | src/main.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/main.c b/src/main.c index 6df6c8b1..4c0af6cd 100755 --- a/src/main.c +++ b/src/main.c @@ -45,6 +45,7 @@ int box64_dynarec_log = LOG_NONE; uintptr_t box64_pagesize; uintptr_t box64_load_addr = 0; int box64_nosandbox = 0; +int box64_malloc_hack = 0; #ifdef DYNAREC int box64_dynarec = 1; int box64_dynarec_dump = 0; @@ -678,6 +679,19 @@ void LoadLogEnv() if(!box64_dummy_crashhandler) printf_log(LOG_INFO, "Don't use dummy crashhandler lib\n"); } + p = getenv("BOX64_MALLOC_HACK"); + if(p) { + if(strlen(p)==1) { + if(p[0]>='0' && p[0]<='0'+2) + box64_malloc_hack = p[0]-'0'; + } + if(!box64_malloc_hack) { + if(box64_malloc_hack==1) { + printf_log(LOG_INFO, "Malloc hook will not be redirected\n"); + } else + printf_log(LOG_INFO, "Malloc hook will check for mmap/free occurences\n"); + } + } p = getenv("BOX64_NOPULSE"); if(p) { if(strlen(p)==1) { |